nice configure
Joshua Root
jmr at macports.org
Sun Jan 11 00:41:18 PST 2009
Joshua Root wrote:
> Jordan K. Hubbard wrote:
>> On Jan 10, 2009, at 11:22 AM, Joshua Root wrote:
>>
>>> I just tested on 10.5.6 by running 'nice nbench', and both Activity
>>> Monitor and top show it using ~99% CPU...
>> A processes' nice factor can generally only be seen to produce results
>> when there is enough contention for CPU resources that it *needs* to be
>> "nice". If there's little to no contention for CPU, however, then the
>> nice'd process is still going to get pretty much whatever it asks for.
>>
>> A much more realistic test would be to run n CPU-hungry processes, where
>> n is > the number of cores you have, and then nice one of them.
>
> Are you saying that the problem only shows up when there is scheduling
> contention? I realise that it's normal for this example to use all the
> CPU despite being niced. It seemed like Adam and William were saying
> that any nice process will show 0% CPU usage.
Running 5 nbench instances, one of which is niced, on a 4-core machine:
PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE
70605 top 8.3% 0:01.74 1 18 29 560K 200K 1156K
18M
70604 nbench 58.9% 0:11.67 1 13 16 140K 232K 376K
20M
70602 nbench 78.8% 0:20.36 1 13 16 140K 232K 376K
20M
70600 nbench 81.9% 0:23.64 1 13 16 140K 232K 376K
20M
70599 nbench 79.6% 0:26.08 1 13 16 140K 232K 376K
20M
70598 nbench 79.8% 0:28.34 1 13 15 84K 232K 328K
20M
Seems to be exactly as expected, and Activity Monitor shows essentially
the same numbers (they fluctuate a little of course).
- Josh
More information about the macports-dev
mailing list