On Mon, 24 Jan 2005, Nick Rout wrote:
I've used nice before, in fact the gentoo emerge system has an environment variable specifically for setting the niceness level on emerges.
I usually set it for 10, as that was the example given to me at the time.
Do I take it from what you are saying that 19 is a special case? not just a bit less than 18?
From /usr/src/linux-2.6.10/Documentation/sched-design.txt
- batch scheduling. A significant proportion of computing-intensive tasks benefit from batch-scheduling, where timeslices are long and processes are roundrobin scheduled. The new scheduler does such batch-scheduling of the lowest priority tasks - so nice +19 jobs will get 'batch-scheduled' automatically. With this scheduler, nice +19 jobs are in essence SCHED_IDLE, from an interactiveness point of view.
I see this text was last updated: 18 April 2002, ie. probably was in the 2.4 series as well.
Comments in /usr/src/linux-2.6.10/kernel/sched.c seem to regard "19" as special as well.
* Ie. nice +19 tasks can never get 'interactive' enough to be * reinserted into the active array.
I run 2 hour long background build all products / all variant tasks on my box. Unfortunately once I introduced distcc on my box, I ended up with 4 or more incarnations of the static analyzer (splint) running simultaneously. This, even at nice -10, was enough to create an irritating dent in interactive performance. (Hence the foray into the world of Reiser4)
However, running it at "nice -19" seems to have solved the problem more effectively than moving to reiser4.
John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : [EMAIL PROTECTED] New Zealand
"The notes I handle no better than many pianists. But the pauses between the notes - ah, that is where the art resides!' - Artur Schnabel
