$linuxjunkies
>

unified hierarchy

also: cgroup v2 hierarchy, unified cgroup hierarchy

A cgroup v2 feature where all cgroups are organized in a single unified tree structure, eliminating the need for separate hierarchies per resource type. This simplifies resource management by enforcing that all processes follow one consistent cgroup organization.

The unified hierarchy, introduced in cgroup v2, replaces the cgroup v1 design where each resource controller (CPU, memory, I/O, etc.) could have its own separate hierarchy tree. With unified hierarchy, there is a single filesystem tree at /sys/fs/cgroup where all resource limits and process groupings are centrally managed.

In cgroup v1, a process could belong to different cgroups for CPU, memory, and I/O simultaneously, creating confusion and inconsistency. The unified hierarchy enforces that all controllers apply to the same cgroup tree, making process organization predictable and easier to reason about.

Example: Under unified hierarchy, you might have /sys/fs/cgroup/system.slice/docker.service where both CPU and memory limits apply to the same cgroup. In v1, you'd need separate paths like /sys/fs/cgroup/cpuset/docker and /sys/fs/cgroup/memory/docker.

Related terms