Coincidentally I've been reading the book "Performance Tuning for Linux Servers" published by the IBM Press (ISBN 0-13-144753-X). It's not the first Linux/Unix performance tuning book that I've read. The sad news, it seems to me, is that Unix and Linux aren't all that tunable. At least they're not very tunable compared to DEC/Compaq/HP VMS which I administered for twenty years. Having said that I will share some what I have learned from the book.
First there are two I/O schedulers, anticipatory and deadline. The difference in performance relates to I/O, not to CPU sharing. Therefore they have nothing to do with managing CPU bound processes.
The function of equitably sharing CPU time is controlled by several tunable parameters. In my SuSE 9.2 system these parameters are defined in /etc/sysconfig/kernel. According to the book these are the important parameters to adjust. Mind you, my explanations are just a small paraphrase of what this book says. You really would need to read this or an equivalent book for a better understanding of these parameters and how they work together to tune the job scheduler.
Exerpts from Chapter 8: Scheduler Tuning:
Increasing this increases the child process' effective priority.
Note that the book contradicts itself for this paremeter saying that reducing this value increases interactive process priority while decreasing this value has the opposite effect.
Setting this value to zero causes the parent process to inherit the child process' sleep average when the child process exits.
Increasing this value causes the scheduler to require that a process accumulate a greater sleep average to be considered interactive.
Increasing this causes the scheduler to require that a process accumulate a greater sleep average to be granted a priority bonus.
Imcreasing this value results in the highest priority task getting more time before it is rescheduled.
Increasing this value results in the lowest priority task getting more time before it is rescheduled.
Decreasing this value results in penalizing the parent process for creating more children by reducing the effective priority of the parent.
Increasing this value gives interactive tasks more bonuses and CPU hogs more penalties.
Increasing this value helps keep interactive tasks in the active job array at the expense of starving noninteractive tasks.
I hope this helps. At least you know specifically what to look up for a more comprehensive explanation of scheduler tuning.
BTW, although this next comment is about interactive performance I'll add it here anyway. I have had good a good result from changing the MAX_TIMESLICE parameter from its default of 40,000 to 10,000 and changing the MIN_TIMESLICE from its default of 1,000 to 500. The names of these parameters are actually SCHED_MAXTIMESLICE and SCHED_MINTIMESLICE in the SuSE /etc/sysconfig/kernel file. Making these changes appears to have improved the performance of KDE. I'm using the 2.6.8-24.24-default kernel on this machine.
Last edited by stress_junkie; 08-26-2006 at 09:16 PM.