On Sun, Jan 12, 2003 at 10:21:09PM +0200, Nadav Har'El wrote:
> On Sun, Jan 12, 2003, guy keren wrote about "Re: 99.6% idle 5.16 load":
> > > If you have load 5 but no process is using CPU time, it is most likely
> > > that you have 5 processed in the "D" (uninterruptable sleep) state. Run
> > > "ps aux" and look for a "D" in the STAT column to confirm this hunch.
> > 
> > this sounds odd - a process in the 'D' state is in an uninterruptible wait 
> > on a resource. thus, it is not supposed to be in the 'ready' (or 'run') 
> > queue, and hence shouldn't be counted inside the 'load average' (which 
> > counts the number of processes in the 'ready' queue or the 'running' 
> > state, in the last X minutes).
> 
> And yet, according to my experience, in Linux it does get counted.
> Obviously it is not in the run queue, but perhaps the "load" does not
> count only the run queue. I don't know - if anybody here can volunteer
> to look at the kernel source, I'd be happy to know the answer to that
> riddle.

I did, since it bothers me for a long time.
It is indeed so, for a very long time (actually always - I checked 1.0,
1.2.12, 2.0.39, 2.2.23 and 2.4.20). Also, when you know what to look for,
google is your best friend:
Searching for '"load average" TASK_UNINTERRUPTIBLE' returns, as the second
result, an email from 1995 (by soemone named Rob Janssen) that says:
"   > 2. The processes counted toward the load average, but didn't consume
   > CPU time. The load average on the still-working machine was >35.

   This is why I always apply the following patch:"
(and a patch to not count TASK_UNINTERRUPTIBLE tasks).

        Didi

> 
> (Oh, and Gabor, is my guess even correct? Do you have any D-state processes?)
> 
> -- 
> Nadav Har'El                        |      Sunday, Jan 12 2003, 10 Shevat 5763
> [EMAIL PROTECTED]             |-----------------------------------------
> Phone: +972-53-245868, ICQ 13349191 |In God we Trust -- all others must submit
> http://nadav.harel.org.il           |an X.509 certificate.
> 
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to