LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-20-2022, 11:09 AM   #1
joemon83
Member
 
Registered: Jan 2009
Posts: 71

Rep: Reputation: 11
cgroup cpu allocation


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.

Last edited by joemon83; 09-20-2022 at 11:43 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicity: invalid argument error backing up /sys/fs/cgroup/systemd/user.slice/user-42.slice/cgroup.event_control dzseti Linux - Software 2 05-17-2022 02:16 AM
cgroup socket(PF_NETLINK, SOCK_DGRAM, 11) = -1 EPROTONOSUPPORT olexandr.klymenko Linux - Kernel 2 12-14-2011 07:34 AM
cgroup olexandr.klymenko Linux - Server 0 12-13-2011 10:29 AM
Alternative to 200 lines kernel patch, /sys/fs/cgroup/cpu missing Linux.tar.gz Slackware 27 11-29-2010 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration