What do cgroups do?
Control groups limit and account for the resources a group of processes can use, such as CPU, memory and I/O. Namespaces decide what a container can see, cgroups decide how much it can use. Without cgroup limits, one container could consume all the host's memory.
Answered in
What docker run Actually Does: Daemon, containerd, runc, Namespaces, cgroupsA container is a normal Linux process with isolation and limits. Follow one docker run from the CLI through dockerd and containerd to kernel namespaces.
Read the full analysisOther questions this article answers
More developer tooling questions
- What are the five fields of a cron expression?
- What does */5 mean in cron?
- Why does my script work in the terminal but fail in cron?
- What happens if a cron job is still running when the next one starts?
- Is a container a lightweight virtual machine?
- What do Linux namespaces do?
- Why is access to the Docker socket dangerous?
Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the Developer Tooling beat.