control group

A Linux kernel feature that limits how much memory, processor time and other resources a group of processes may use.

In more detail

Where namespaces decide what a process can see, control groups decide how much it can take. Each limit is just a number in a file under /sys/fs/cgroup, such as memory.max, cpu.max or pids.max, and the kernel enforces it. Docker writes those files when you pass flags like --memory or --cpus, and Kubernetes requests and limits end up in the same files. Modern systems use version 2, which puts every controller in one tree.

Example

docker run --rm -m 64m alpine:3.20 cat /sys/fs/cgroup/memory.max   # 67108864

Related terms

Taught in

References

Certification courses