1.2. Relationships Between Subsystems, Hierarchies, Control Groups and Tasks
Rule 1
cpu
and memory
subsystems (or any number of subsystems) can be attached to a single hierarchy, as long as each one is not attached to any other hierarchy which has any other subsystems attached to it already (see Rule 2).

Figure 1.1. Rule 1
Rule 2
cpu
) cannot be attached to more than one hierarchy if one of those hierarchies has a different subsystem attached to it already.
cpu
subsystem can never be attached to two different hierarchies if one of those hierarchies already has the memory
subsystem attached to it. However, a single subsystem can be attached to two hierarchies if both of those hierarchies have only that subsystem attached.

Figure 1.2. Rule 2—The numbered bullets represent a time sequence in which the subsystems are attached.
Rule 3
cpu
and memory
subsystems are attached to a hierarchy named cpu_mem_cg
, and the net_cls
subsystem is attached to a hierarchy named net
, then a running httpd
process could be a member of any one cgroup in cpu_mem_cg
, and any one cgroup in net
.
cpu_mem_cg
that the httpd
process is a member of might restrict its CPU time to half of that allotted to other processes, and limit its memory usage to a maximum of 1024
MB. Additionally, the cgroup in net
that the httpd
process is a member of might limit its transmission rate to 30
MB/s (megabytes per second).

Figure 1.3. Rule 3
Rule 4
httpd
task that is a member of the cgroup named half_cpu_1gb_max
in the cpu_and_mem
hierarchy, and a member of the cgroup trans_rate_30
in the net
hierarchy. When that httpd
process forks itself, its child process automatically becomes a member of the half_cpu_1gb_max
cgroup, and the trans_rate_30
cgroup. It inherits the exact same cgroups its parent task belongs to.

Figure 1.4. Rule 4—The numbered bullets represent a time sequence in which the task forks.
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.