What are the default cgroup hierarchies?



  • See Redhat documentation warning:

    0_1548941329811_redhat_warn_cgroups.png

    Also see: What are control groups in linux?

    Linux based operating systems that use systemd, create a default cgroup hierarchy.

    Some background behind systemd types will be helpful in explaining the cgroup hierarchies.

    • Services - name.service
    • Scope - name.scope
    • Slice - parent-name.slice root slice being -.slice

    Services - A process or group of processes that are started by a unit configuration file, the processes are managed this way because they can be stopped or started as a set.

    Scope - Externally created processes that are started by the fork() system call. The processes are started as and when required or requested. Examples are user sessions, virtual machines, and containers.

    Slice - Units that are structured in a hierarchical way. They consist of services and scopes. No processes exist in a slice, the processes are in scopes and services. The parent name is the path to the location in the hierarchy.

    The four slices created by default are:

    • -.slice - the root slice, you do not visibly see this, it is the entire cgroup tree.
    • system.slice - the default place for all system services.
    • user.slice - the default place for all user sessions.
    • machine.slice - the default place for all virtual machines and Linux containers.

    The only slice with a process is the special systemd.slice with PID 1 for the init process (systemd process)


Log in to reply
 

© Lightnetics 2024