cgroup
Definition
A control group (cgroup) is a kernel mechanism that places processes in a hierarchy and enforces resource accounting and limits per group, such as CPU quotas, a memory ceiling and block I/O weights.
In practice
Namespaces decide what a container can see; cgroups decide how much it can use. Container runtimes and the kubelet translate resource requests and limits into cgroup settings, which is how one runaway process is stopped from starving its neighbours on a shared host.
The two limits behave very differently. A container over its CPU quota is throttled, which stretches latency even when the host is idle; a container over its memory limit is OOM-killed, often in a restart loop. Set memory limits from measured usage and be careful with tight CPU limits on latency-sensitive services.
Example
With a CPU limit of 0.5 cores and a 100 ms CFS period, a request that needs 80 ms of CPU in a burst is paused after 50 ms and finishes in the next period, adding about 50 ms of latency.