LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   What "xload" sees which "top" doesn't? (http://www.linuxquestions.org/questions/linux-general-1/what-xload-sees-which-top-doesnt-4175440081/)

kaza 12-05-2012 01:31 AM

What "xload" sees which "top" doesn't?
 
Hello,

I'm used to keep both "xload" and a terminal
with "top" opened on my workstation all of the time
to see what's running. Few minues ago I noticed
that "xload" graph started showing what looked like
a single process taking 100% CPU for few minutes.
But the "top" window showed no process using 100%
CPU, in fact, most of the time there was almost no
CPU usage at all. Neither was an "I/O wait" usage
not anything else I could see at the "top" window.
I checked if both "xload" and "top" are running
on the same machine - apparently they are. To be sure
they both show the same machine, after the "phantom"
process in the "xload" finished loading the
workstation, I started a CPU-intensive process -
the "xload" showed load of 1 for few minutes
and the "top" showed the process using 100% CPU
and they both showed the beginning and the end
of the process I started.

I'm puzzled: what can be seen by "xload" but not
by "top"?

We're running at work RedHat on AMD64 platform
with 4 cores.

TIA,
kaza.

syg00 12-05-2012 03:04 AM

I've never used xload, and I can't see why I'd want to, but you'd do well to understand what the tools are trying to tell you. Read the manpages.
How did you come to the following conclusion ?.
Quote:

Few minues ago I noticed that "xload" graph started showing what looked like a single process taking 100% CPU for few minutes.
Have a read of this to get an idea of what loadavg really means. It's old, but still fairly relevant.

kaza 12-07-2012 11:29 PM

Thanks, syg00,

very good article. So, IIRC, what can cause a load to be measured as 1
but without CPU % is a queue of instructions generated by a process
but not executed by CPU. What can cause instructions to wait
for CPU except I/O wait (which was zero %) and when nothing uses
the CPU?

TIA,
kaza.

syg00 12-08-2012 01:25 AM

loadavg is just that - an (decaying) average. Composed of the count of ready tasks (running or waiting for CPU) and tasks in uninterruptible sleep. The latter are generally considered to be waiting on (disk) I/O, but isn't the only case.
Any task (process) in uninterruptible wait will contribute to the load(avg) count. Apache (and Oracle) has a habit of creating these and forgetting about them. Sometime forever ...


All times are GMT -5. The time now is 04:50 PM.