IT lexicon › Infra & Ops › cgroups

cgroups

Infra & Ops På svenska → Updated: 2026-05-27

Control Groups — a Linux kernel feature that limits and measures resource usage (CPU, RAM, IO, network, PID) per process group. Together with namespaces, the foundation of containers. v2 (cgroupv2) since kernel 4.5 (2016) consolidates v1's fragmented hierarchy.

v1: separate hierarchies per resource (memory, cpu, blkio each had its own tree). v2: unified hierarchy, all controllers on the same tree. Kubernetes uses cgroups for pod resource limits (CPU shares, memory limit → OOMKilled). systemd creates cgroups per service. Docker --cpus=2 maps to cgroup cpu.max. Memory-pressure events (PSI) — the kernel signals when a cgroup is near OOM. Modern allocation: all new distros run cgroupv2 by default.

← Back to the lexicon