Operating System - HP-UX
1829705 Members
2437 Online
109992 Solutions
New Discussion

top shows high load but also high CPU idle %

 
Sami Koskela
Occasional Contributor

top shows high load but also high CPU idle %

Hi !

I'm a little confused here, please advice me.

I'm looking at top output and it tells me that load is around 7.00.

You would think at this point that CPU is busy.

But, top also says that IDLE% is around 60-70%.

At this point you would think that CPU is waiting for disk I/O. That's not true either, sar -u gives %WIO less than 10%.

So, why is top saying that load is 7.00, which I consider high. Or am I missing something here ?

Thanks for help,

Sami
7 REPLIES 7
S.K. Chan
Honored Contributor

Re: top shows high load but also high CPU idle %

Are you running 11i ? If yes check this, it may/may-not be the case for you.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x277a50011d20d6118ff40090279cd0f9,00.html
Michael Tully
Honored Contributor

Re: top shows high load but also high CPU idle %

Hi,

In my opinion, load is not a good metric
when you can see that you have idle CPU
time. This means that your system is
wasting time and blocking your processes
while doing other things.

Have a look at these two threads for an
explanation by others. You can run these
commands to assist in seeing what is
perhaps causing your problem.
sar -q
sar -u
sar -d

'glance' is much better tool than top.
You can load a trial version from your
Application CD set.

HTH
-Michael

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4d521012aa92d5118ff10090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xcba20cb17a32d5118fef0090279cd0f9,00.html

Anyone for a Mutiny ?
Patrick Wallek
Honored Contributor

Re: top shows high load but also high CPU idle %

Something else to check is your kernel parameter 'timeslice'. If you have implemented any of the kernel parameter templates then timeslice most likely got changed to '1'. That's BAD.

Change it back to the default of '10', rebuild the kernel and reboot the machine and you will probably see much improvement.
Sami Koskela
Occasional Contributor

Re: top shows high load but also high CPU idle %

Hi,

just a bit more info to my previous message:

I'm running: HP-UX B.11.00 U 9000/800
kernel param timeslice is: 10

and average values for sar.

sar -q:
runq-sz %runocc swpq-sz %swpocc
6.2 100 0.0 0

sar -u
%usr %sys %wio %idle
35 9 18 39

sar -d(10 disks):
%busy avque r+w/s blks/s avwait avserv
14.69 3.55 22 307 15.28 13.89
10.11 4.21 17 272 16.57 12.30
8.94 0.51 24 437 4.88 4.08
2.20 0.56 5 105 4.97 5.23
6.74 0.50 19 353 4.86 3.72
1.34 0.50 3 73 4.85 4.67
4.98 0.78 7 148 5.50 10.28
4.34 0.81 6 135 5.62 10.11
1.52 1.57 4 265 8.61 14.04
1.10 1.40 4 254 7.21 11.30

regards,

Sami
Sami Koskela
Occasional Contributor

Re: top shows high load but also high CPU idle %

Hi,

This is what I found, and I think I don't have a problem.

I checked from glance:
even if
GBL_RUN_QUEUE is high (3-7) all the time, my
GBL_PRI_QUEUE is just 0.4 - 0.8.

So, GBL_RUN_QUEUE is showing a lot of other things that I was wanting to see, and is shown in top, uptime etc.

GBL_PRI_QUEUE is the one I should be looking at. that is fine.

I have one processor machine and over 220 processes running.

around 10-15 of these processes are using streamed pipes and thus waiting in kernel pipe threads. I guess these threads are shown in GPL_RUN_QUEUE number... ?

All those processes are small processes which are waiting for input from pipe, and when they get it, input is processed very quickly and then the process starts waiting for another input from the pipe.

from process list, for all 10-15 processes values of these variables are:

PROC_IPC_SUBSYSTEM_WAIT_PCT = 100%
PROC_STOP_REASON = PIPE

So, I guess for this reason GPL_RUN_QUEUE shows too high values even though the system runs fine.

If you still read this, please correct me if I'm making wrong conclusions here.

thanks for your help

Sami


Eric Ladner
Trusted Contributor

Re: top shows high load but also high CPU idle %

The load value that top reports is the number of jobs in the run queue and the CPU time is the time the CPU is actually busy.

Keep in mind that the 30 or 40% of the time the CPU is not busy, doesn't mean the job isn't running. Just about any time a process executes some kind of I/O request, it gets kicked out of the CPU.

If you have a I/O intensive system (running Oracle, for example) your system can be really busy (lots of processes doing stuff), but not hitting high CPU (they are waiting on I/O requests to be filled).

Actually you can hit 100% CPU on Oracle, but usually that just means a poorly tuned SQL statement is running.

Jason VanDerMark
Trusted Contributor

Re: top shows high load but also high CPU idle %

Aside from using glance, I have found that vmstat gives much better information than top does. It allows you to see your run queue, reclaimed pages, overall percentage of cpu being used by user and system processes, blocked processes, etc. at a glance(no pun intended). I was told by several HP people that load is pretty much useless under HP-UX due to the fact that HP doesn't use it properly. Never trust the load. Always check multiple sources to get a better picture of what's going on. Hope this helps.

Regards,
Jason V.
Tie two birds together, eventhough they have four wings, they cannot fly.