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 # 67108864Related terms
- resource limit — A cap on how much memory, processor time or number of processes a container may use.
- memory limit — The most memory a container may use before the kernel kills a process inside it.
- CPU limit — A cap on how much processor time a container may use, expressed as a number of processors.
- PID limit — A cap on how many processes a container may run at the same time.
- namespace (Linux) — A Linux kernel feature that controls what a process can see, such as which other processes, network or host name.
Taught in
- Sandboxed Pods: RuntimeClass And gVisor — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Why Containers: Bare Metal, Machines And Processes — Docker Architecture & Production Containers
- Namespaces And Cgroups: Isolation And Limits — Docker Architecture & Production Containers
- Union Filesystems, Images And Writable Layers — Docker Architecture & Production Containers
- Docker, OCI, The Engine And The CLI — Docker Architecture & Production Containers
- Install Docker And Verify Your Environment — Docker Architecture & Production Containers
- Environment, Secret Files And Runtime Restrictions — Docker Architecture & Production Containers
- Harden And Deliver The Complete Service Stack — Docker Architecture & Production Containers
- Pin It, Lint It, Prove It: Images And Runtimes — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Troubleshooting: OOMKilled, Throttling And Evictions — Kubernetes: Production-Grade Container Orchestration
- Works On My Laptop: Images, Containers, Volumes And Networks — CompTIA Linux+ (XK0-006) Exam Prep