On Sat, 13 Jun 2009 23:39:52 +0200, Sascha Hlusiak wrote:
> How do you know how many processes are running? What does 'top' say
> about CPU usage and load? Maybe dnetc has two threads, which can each
> occupy a core, so you have still 4 threads that are running, in 3
> processes. You still should get a load of 5 or higher.
> You don't have a lot of IO load, do you?

Technically, in the scenario I described, I only have two processes, as 
dnetc is running with four threads. To simplify the situation, I created 
a simple Python script that does nothing other than loop indefinitely. I 
then start four separate nice 19 copies of it in four separate terminals. 
At this point, top reports that each CPU is almost entirely executing 
niced code. Load average is a little bit above 4, as expected.

At this point, I leave these four copies running, and execute a fifth 
copy without nicing it, so it ends up with a nice value of 0. At this 
point, cpu0 is executing almost 100% user. cpu2 and cpu3 are executing 
almost 100% nice. Finally, cpu1 is almost 100% idle. (The actual CPU 
numbering seems to shift around every so often.)

Thus, I have five processes, four at nice 19, one at nice 0, a load 
average of just over 5, but only 3 out of the 4 cores are actually doing 
anything. 


Reply via email to