Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-23-2010, 09:20 AM   #1
LQ Newbie
Registered: Apr 2010
Posts: 1

Rep: Reputation: 0
CGROUPs and fair group scheduling

I have played around a little bit with CGROUPS and the fair group scheduler ( using kernel version 2.6.31). When you have CGROUPS in a flat structure, with only one layer from the root-cgroup, everything works as you might expect when setting the cpu.shares parameter, i.e. a fraction of the total. But when I experimented with having deeper levels of CGROUPs it did'nt make any sense sometimes.

For example, I had one CGROUP with the maximum number of shares (260000 something) , and two childgroups with quite little shares, 5000. Then I created some cpuhogging processes ( while(1); ) and put most of them in childgroups and one in the parentgroup. The logical thing would be if the parentgroups single process took almost all CPU-time, as it had the maximum number of shares, but instead the processes in the childgroups got the most CPU-time.

I have tried to figure out how it works by looking at the source code, but I can't really understand it. How does the hierarchical structure of the cgroup-tree interact with the flat aspect of it, i.e. siblings? Or do I misunderstand the whole concept?
Old 04-24-2010, 06:40 AM   #2
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,888

Rep: Reputation: 2192Reputation: 2192Reputation: 2192Reputation: 2192Reputation: 2192Reputation: 2192Reputation: 2192Reputation: 2192Reputation: 2192Reputation: 2192Reputation: 2192
There is some doco in the source tree, and there has been (quite) some discussion on lkml over the last couple of years.
I have only used it in the context of the original cpusets - in that I would isolate workloads to subset(s) of the available CPUs; but only at (full) CPU boundaries.

Can't be of any more help unfortunately - must look in more detail someday.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fair group CPU scheduler Zibi1981 Linux - Kernel 8 01-19-2008 09:35 PM
LXer: Linux: CFS Scheduler v19, Group Scheduling LXer Syndicated Linux News 0 07-07-2007 06:16 PM
LXer: Fair use or lack of fair play? LXer Syndicated Linux News 0 07-22-2006 06:03 AM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 04:01 PM
Fair Share Scheduling spook-boy Linux - General 1 01-30-2002 11:59 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:49 PM.

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