PDA

View Full Version : Linux kernel 2.6 and niceness



Stephen_B
11-10-2004, 05:31 PM
Have others been unhappy with the way the kernel scheduler has been working? Sometimes setting a process to a nice level of 19 doesn't give it lowest priority over processes with a lower nice level.

One area I've noticed this is with Cedega (running windows games under linux). Having to emulate the windows scheduler causes issues with the linux scheduler, such that setting it to 19 actually can help performance compared to running it at the normal 0. But at 19 it's competing with DHEP, so ... :bang:

I just switched to using Suse's 9.2 kernel, and it already seems snappier than the 9.1 version, so hopefully I can use my computer to do some gaming without having to stop DHEP.

Anyone know if it's possible to suspend and then resume DHEP instead of killing it?

tcfelker
01-06-2005, 03:38 AM
It seems like what you're looking for is SCHED_BATCH. This is a special scheduling class (as opposed to SCHED_OTHER, which most processes use), which, unlike nice -n 19, will not give the process any CPU time if other processes are runnable. Unfortunately, it's not in the vanilla kernel. I'd suggest running a -ck kernel (http://members.optusnet.com.au/ckolivas/kernel/), or you could try to find seperate patches for it. And it's possible SuSE's kernel already has it. (Easiest way to tell, assuming you have kernel source or at least headers installed, is "fgrep -r SCHED_BATCH /usr/src/linux" - if it gets matches, you have it.) Anyway, once you get a kernel that has it, install schedtool (http://freequaos.host.sk/schedtool/). Then, run DHEP with "schedtool -Be the-rest-of-the-commandline"