RE: Why so must idle time ?

From: Richard B. Johnson (root@chaos.analogic.com)
Date: Fri Jul 07 2000 - 13:50:44 EST


On Fri, 7 Jul 2000, Giuliano Pochini wrote:

>
> >> I have a machine running web server. It has a lot of httpd's loaded and
> >> most of them are sleeping. The load average is always around 7-13, so I
> >> wonder why the CPU usage doesn't reach ~100%. It wastes CPU time or
> >> simply there is something top does not show ?
> >
> > Two words, "disk I/O".
>
> Which is very low. I have 384MB and disk i/o is below 1MB/s most of time with
> little seeking. Anyway during disk I/O the task is sleeping, not ready, and CPU
> should be given to another task.

If all the tasks are sleeping, waiting for disk I/O, who do you give
the CPU to? It gets given to the loop in the kernel that does...

                for(;;)
                     idle();

This is Task 0. It consumes all the CPU time when everybody is waiting
for I/O.

Cheers,
Dick Johnson

Penguin : Linux version 2.2.15 on an i686 machine (797.90 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:21 EST