[gentoo-user] Re: Idle Process Scheduling

2009-06-14 Thread Jason Lynch
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. 




[gentoo-user] Idle Process Scheduling

2009-06-12 Thread Jason Lynch
I'm having a strange problem on my Q6600 that cropped up starting with 
the 2.6.29 series of the kernel, and is still present in 2.6.30.

Essentially, at all times, I have four nice 19 processes running, which 
for the sake of this post, we'll call dnetc. All four cores are 
utilized. At this point, if I start another CPU-bound process that isn't 
niced, it begins to take up an entire core. This is expected. What isn't 
expected, however, is that another core begins idling inexplicably. As a 
result, despite 5 processes currently available to run, only 3 are 
actually running at any given time (the non-niced process, and two 
instances of dnetc).

I have no idea where to begin diagnosing this, so if anyone has any 
pointers or knows anything, I'd like to hear about it. I've done numerous 
searches of mailing lists, bug trackers, etc., but haven't found 
anything. Maybe I just can't find the right keywords.