1 |
On Sat, 13 Jun 2009 23:39:52 +0200, Sascha Hlusiak wrote: |
2 |
> How do you know how many processes are running? What does 'top' say |
3 |
> about CPU usage and load? Maybe dnetc has two threads, which can each |
4 |
> occupy a core, so you have still 4 threads that are running, in 3 |
5 |
> processes. You still should get a load of 5 or higher. |
6 |
> You don't have a lot of IO load, do you? |
7 |
|
8 |
Technically, in the scenario I described, I only have two processes, as |
9 |
dnetc is running with four threads. To simplify the situation, I created |
10 |
a simple Python script that does nothing other than loop indefinitely. I |
11 |
then start four separate nice 19 copies of it in four separate terminals. |
12 |
At this point, top reports that each CPU is almost entirely executing |
13 |
niced code. Load average is a little bit above 4, as expected. |
14 |
|
15 |
At this point, I leave these four copies running, and execute a fifth |
16 |
copy without nicing it, so it ends up with a nice value of 0. At this |
17 |
point, cpu0 is executing almost 100% user. cpu2 and cpu3 are executing |
18 |
almost 100% nice. Finally, cpu1 is almost 100% idle. (The actual CPU |
19 |
numbering seems to shift around every so often.) |
20 |
|
21 |
Thus, I have five processes, four at nice 19, one at nice 0, a load |
22 |
average of just over 5, but only 3 out of the 4 cores are actually doing |
23 |
anything. |