Cgroup
A cgroup accounts for and limits the resources that a group of processes uses: CPU shares, memory caps, and I/O.
A control group, or cgroup, is a set of processes that the Linux kernel measures and limits together. A typical limit is a cap on memory or a share of CPU time. Every process on a Linux system belongs to one group. The kernel counts usage for the group as a whole rather than for each process alone. A running process can move to another group, and the limits of the new group then apply to it.
Where a namespace controls what a process can see, a control group controls how much of the machine it can use. Child processes start in the group of their parent, so a limit covers everything that runs inside the group. A program cannot escape its limit by starting helper processes, since each helper is counted too. Only a process with the right permissions can move another process into a different group.
Control groups keep one workload from starving another on a shared host. Without them, a single runaway program could take every core or all the memory and slow every neighbor. With limits in place, a host can run many containers or sandboxes and still give each one its share. The caps also make behavior predictable, because no sandbox can grow past what it was given. Container runtimes and hypervisor processes both rely on cgroups for this accounting.