LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-23-2010, 09:20 AM   #1
AxeMan68
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
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
  


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 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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:25 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