LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-12-2008, 05:36 PM   #1
Zibi1981
Member
 
Registered: Dec 2006
Location: Poland
Distribution: Kubuntu
Posts: 65

Rep: Reputation: 15
Question Fair group CPU scheduler


Hi!
Could someone explain to me if the option Fair group CPU scheduler (FAIR_GROUP_SCHED) in the Linux kernel is something worth enabling on a desktop system, or I shouldn't bother? I'm trying to build a preemptible kernel and want to know whether this option will contribute to that goal.
 
Old 01-12-2008, 07:20 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Control groups is the new iteration of "containers" - if you don't know what it is you probably don't need it (on a desktop).
Quote:
I'm trying to build a preemptible kernel
Really ...
CFS is pre-emptible by nature - what is the problem you think you are trying to fix ???.
 
Old 01-13-2008, 04:52 PM   #3
Zibi1981
Member
 
Registered: Dec 2006
Location: Poland
Distribution: Kubuntu
Posts: 65

Original Poster
Rep: Reputation: 15
Hi!

Thanks for your reply syg00

I just want to build a multimedia low-latency kernel, which would serve me best on my desktop. I mean not only gaming, but also better everyday working. Standard Mandriva kernel has so many options that I don't need, so I'm curious which I can disable, and also which maybe to enable for better system performance.
 
Old 01-13-2008, 05:26 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
The best places to look, besides the kernel-oriented forums on other sites more devoted to this issue, would be the source-code itself.

Code:
cd /usr/src/linux
grep -rilw FAIR_GROUP_SCHED *
Remember also that nearly all of the things that contribute to "human-visible poor performance" will be related to I/O and nothing else. I would not expect the kernel-settings that you are now investigating to have a particularly useful effect at all.

If your system was hosting the game, on the other hand, then it might...

Last edited by sundialsvcs; 01-13-2008 at 05:27 PM.
 
Old 01-13-2008, 06:49 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Make sure you have the correct pre-emption model, and timer frequency.
Plenty of people have plenty to say on the web - here is one that seems (very) current.
CFS will be the scheduler at that kernel level. All that should help get you to where you want.
 
Old 01-14-2008, 04:49 AM   #6
Zibi1981
Member
 
Registered: Dec 2006
Location: Poland
Distribution: Kubuntu
Posts: 65

Original Poster
Rep: Reputation: 15
Cool

Thanks a lot for your advices guys!

Sundialsvcs, I'm not hosting games, I only play them I'm wondering if enabling Fair group CPU scheduler in my kernel will have any effect on its performance. The command You gave me returns nothing
One more, if I/O is mostly related to performance deterioration, then which scheduler will You recommend? I have three in my kernel, and the default one is CFQ, but I read that Anticipatory is a good idea in some cases.

http://www.fotosik.pl/pokaz_obrazek/...965a47c3a.html

Syg00, thanks for the link. I did some reading actually about using real-time patches, but also have my doubts. The problem is Mandriva's kernel is...hmm...quite heavily patched - here You have the list of the patches on 2.6.22.12 kernel, which I'm using at the moment. I'm afraid that applying another patch will result in inability to compile it or similar. On the other hand if I would like to use a vanilla kernel (i.e. 2.6.24 which I'm waiting for), then there is a huge probability that something won't work on my system because new kernel will lack some functionality...

What do You advise guys?

Last edited by Zibi1981; 01-14-2008 at 04:51 AM.
 
Old 01-16-2008, 03:01 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Most out-of-tree patches are for "corner" cases - some odd-ball combination of hardware and/or software. Not always, but most.
Stick a vanilla kernel in and see what happens. It's just a kernel - it it doesn't work, go back to a known good one. I'd be surprised if you had problems.
Same for the schedulers - try a couple; I'd be *real* surprised if you are able to determine a difference in normal workloads.
Simple to change at the bootloader.
 
Old 01-17-2008, 07:03 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
If I/O is the root cause of your problem, then the CPU scheduler choice probably will not matter.

Likewise, a choice of I/O queueing strategies probably won't matter too much unless there is a substantial I/O request queue developing and a multitude of drives upon which to launch them.

Many computers "simply" use the built-in disk controller that is found on the motherboard. And they "simply" use IDE/EIDE disk controllers because such drives are fast and cheap. There are alternatives.

But the bottom line is this... there are no "knee-jerk solutions" to be found, period. Every real "solution" is a remedy for a specific scenario, useful if and only if that problem-case has been determined to actually exist. Everybody wants a "magic snake oil" solution, but these are all just illusions. You have to determine where your true problem lies, and quantify your findings in some way, before you can meaningfully solve it.

The first thing that I would suggest to you is... can you avoid it? Can you stuff your motherboard with RAM? Can you invest in a faster motherboard (with all the RAM it can hold)?

Then... "when the computer is 'running slow,' is the hard-disk drive light on or off?" If you were to guess as to what the computer might be "waiting on," what might that be?

Do you have the ability to add a second disk-drive, on an entirely different disk-controller channel than the first?

Remember that "slowness" is a human perception, actually related to "response time." Slowness, in human terms, is measured in "tens or hundreds of milliseconds," which is an eternity to any CPU.
 
Old 01-19-2008, 09:35 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I just stumbled on this - if there is nothing to watch on TV, try reading it for a bit of background.
 
  


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
LXer: Linux: The Really Simple Really Fair Scheduler LXer Syndicated Linux News 0 09-07-2007 01:20 AM
LXer: Linux: Discussing the Really Fair Scheduler LXer Syndicated Linux News 0 09-04-2007 01:00 AM
LXer: Linux: The Really Fair Scheduler LXer Syndicated Linux News 0 09-01-2007 09:50 AM
LXer: Linux: Completely Fair Scheduler Merged LXer Syndicated Linux News 0 07-11-2007 03:46 AM
LXer: Linux: The Completely Fair Scheduler LXer Syndicated Linux News 0 04-18-2007 07:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:38 AM.

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