Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'nice/renice DOES NOT work!' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
nice/renice DOES NOT work!
Authored by: oeyvind on Apr 06, '01 04:07:39AM

Just FYI, the renice/nice command does not work because the kernel system calls used by the renice command are not connected to the mach scheduler. Sure, it
updates the nice value in the process structure, but the mach scheduler doesn't use it; it uses the priority bits in the mach task and thread structures.

Any difference you see after renicing a process is purely psychological. The source code is there for all to see. If you don't believe that, start two CPU bound processes. Watch them each get about 50% of CPU time. Renice one of them. Watch them each still get about 50% of CPU time.

[ Reply to This | # ]
nice/renice DOES NOT work!
Authored by: Erik Toh on Apr 06, '01 07:21:10AM

Hi, thanks for bringing that to my attention... I did a 'ps onice' and saw the expected results, and thus didn't check to see if it really worked. Mea culpa.

[ Reply to This | # ]
Authored by: robg on Apr 11, '01 11:12:33AM
Check out this thread on MacFixIt - someone ran timings before and after renice, and it certainly appeared to have an impact: Any thoughts? -rob.

[ Reply to This | # ]