Hi,
I just wanted to understand how cgroup allocates/limits cpu.
So on my system i have following default hierarchy that comes on a RHEL 7 box.
Code:
root@hostname /sys/fs/cgroup/cpu]# ls
cgroup.clone_children cgroup.procs cpuacct.stat cpuacct.usage_percpu cpu.cfs_quota_us cpu.rt_runtime_us cpu.stat notify_on_release system.slice user.slice
cgroup.event_control cgroup.sane_behavior cpuacct.usage cpu.cfs_period_us cpu.rt_period_us cpu.shares mem_cpu_limit release_agent tasks
root@hostname /sys/fs/cgroup/cpu]#
the root cgroup has cpu.shares value of 1024.
And then i have sub cgroups under it:
user.slice
system.slice
mem_cpu_limit
Each of these sub cgroups have cpu.shares of 1024, just like the root cgroup.
So now my question is how much of CPU share does user.slice, system.slice and mem_cpu_limit gets ? And how much cpu.shares does tasks in root cgroup get ?
Not sure if its correct to assume that root cgroup, user.slice, system.slice and mem_cpu_limit gets 25% slice each.