1836379 Members
2464 Online
110100 Solutions
New Discussion

Re: CPU Used - top x sar

 
SOLVED
Go to solution

CPU Used - top x sar

I had a report from top that is different from sar report of CPU usage.
With top i had 40% CPU Idle, and with sar 35 % wio and 2,5% idle.
WIO is the amount of time in state "waiting for I/O", is CPU used or idle in this moment ?
The attach is the top and sar reports.
6 REPLIES 6
Sandip Ghosh
Honored Contributor

Re: CPU Used - top x sar

CPU is waiting for the data to process. Is the Server is swapping a lot or this is the normal I/O requirement?
The same scenario you can see at Glance also. You will find that the bar is telling that CPU Usage is 100% but when you get the Alert report you will see that the CPU is 75% busy.

Sandip
Good Luck!!!
Keith Johnson
Valued Contributor

Re: CPU Used - top x sar

Waitiing for I/O is the time the CPU spends waiting for a disk I/O request to complete. When CPU idle is low, and wio% is high; it is a symptom of an I/O bottleneck.
No matter where you go...there you are.

Re: CPU Used - top x sar

Sandip, it??s the normal I/O requirement. The Server don??t have swap activity.
I want to know if, in this case, CPU is 40% or 2,5% idle for another process ?
Keith Johnson
Valued Contributor
Solution

Re: CPU Used - top x sar

In this case the CPU is 2.5% idle for another process.
No matter where you go...there you are.

Re: CPU Used - top x sar

Thanks.
In this case, top is a bad tool to verify CPU idle ?
Glance report this problem too ?
Darrell Allen
Honored Contributor

Re: CPU Used - top x sar

Here's a link to a doc that should help explain %wio:
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000024669440&admit=-682735245+1032439057876+28353475

From that document:

An example sar(1M) output may be similar to the following:

# sar 4 5


17:08:59 %usr %sys %wio %idle
17:09:03 0 0 0 100
17:09:07 0 3 26 71
17:09:11 0 11 89 0
17:09:15 0 3 40 56
17:09:19 0 0 0 100

Average 0 3 31 66

The %usr is the percentage of time the CPU spent running in user code.

The %sys is the percentage of time the CPU spent running system code.

The %wio is the percentage of time the CPU spent blocked on IO. This only includes block IO, raw IO, or Virtual Memory operations like pagein/swapin. It does not include time spent on tape IO or terminal IO. If %wio is high, it could be an indication of a disk bottleneck or it could simply mean that the CPU has nothing else to do while it waits for a process to complete its IOs.

The %idle is the percentage of time the CPU is totally idle, with essentially nothing running or nothing performing disk or other
block/raw IO.

In the above example, we started off with an idle system (%idle=100%).
Then the cp(1) command was issued to make a copy of the kernel. This caused us to enter system code (%sys), and do disk I/O to copy the
data (%wsio=89). The cp(1) command was constantly reading the source
file then copying to the destination file. So the CPU was either in the cp(1) code, or it was waiting for I/O to complete. Once the cp was
complete, the system returned to an idle state.

Remember, however, that other processes can make use of the %wsio time when the CPU is blocked on I/O, thus causing the %wsio to decrease as %user and $sys increase.


So as I understand it, a cpu in %wio can process other requests since it isn't really "doing" anything at the time. Effectively, the cpu is idle.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)