Tag: cgroup

  • Cgroups management on Linux – first steps

    Hi,

    I didn’t know that much about control groups but i see that there are a big thing in performance and process optimization.
    For the moment i would like to share two important info that i found.
    First, there are three options that you need to activate in you want to play with control group management:

    DefaultCPUAccounting=yes
    DefaultBlockIOAccounting=yes
    DefaultMemoryAccounting=yes
    

    thtat you can find under /etc/systemd/system.conf.

    And, there is also a command that shows CPU utilization along with other info related to the user/system slices – systemd-cgtop.
    If the accounting is not enabled, no details are shown…..once you do that you will have info like this:

    Path                                                                                                                                                                        Tasks   %CPU   Memory  Input/s Output/s
    
    /                                                                                                                                                                              66    9.2        -        -        -
    /user.slice                                                                                                                                                                     -    5.0        -        -        -
    /user.slice/user-1000.slice                                                                                                                                                     -    5.0        -        -        -
    /user.slice/user-1000.slice/session-1.scope                                                                                                                                    47    5.0        -        -        -
    /system.slice                                                                                                                                                                   -    3.8        -        -        -
    /system.slice/lightdm.service                                                                                                                                                   2    3.5        -        -        -
    /system.slice/docker.service                                                                                                                                                    2    0.3        -        -        -
    /system.slice/vboxadd-service.service                                                                                                                                           1    0.0        -        -        -
    /system.slice/ModemManager.service                                                                                                                                              1      -        -        -        -
    /system.slice/NetworkManager.service                                                                                                                                            2      -        -        -        -
    /system.slice/accounts-daemon.service                                                                                                                                           1      -        -        -        -
    /system.slice/acpid.service                                                                                                                                                     1      -        -        -        -
    /system.slice/atd.service                                                                                                                                                       1      -        -        -        -
    /system.slice/avahi-daemon.service                                                                                                                                              2      -        -        -        -
    /system.slice/colord.service                                                                                                                                                    1      -        -        -        -
    /system.slice/cron.service                                                                                                                                                      1      -        -        -        -
    /system.slice/cups-browsed.service                                                                                                                                              1      -        -        -        -
    /system.slice/cups.service                                                                                                                                                      1      -        -        -        -
    /system.slice/dbus.service

    That is all so far. I will let you know once i discover new info.

    Cheers