Is total CPU usage for sar %user+%system+%iowait?


 
Thread Tools Search this Thread
# 1  
Is total CPU usage for sar %user+%system+%iowait?

Hi all

Can anyone advise/confirm whether total CPU usage when running sar is %user+%system+%iowait or is it %user+%system only?

I want to confirm whether I am having a CPU-bound problem or not.

This is a single-CPU VMware machine.

Code:
[oracle@prod01 bdump]$ sar 5 20
Linux 2.6.18-238.5.1.el5 (prod01.globe.local)     03/27/2012

08:00:55 AM       CPU     %user     %nice   %system   %iowait    %steal     %idle
08:01:00 AM       all     99.20      0.00      0.80      0.00      0.00      0.00
08:01:05 AM       all     99.20      0.00      0.80      0.00      0.00      0.00
08:01:10 AM       all     99.80      0.00      0.20      0.00      0.00      0.00
08:01:15 AM       all     98.20      0.00      1.80      0.00      0.00      0.00
08:01:20 AM       all     99.40      0.00      0.60      0.00      0.00      0.00
08:01:25 AM       all     99.80      0.00      0.20      0.00      0.00      0.00
08:01:30 AM       all     99.60      0.00      0.40      0.00      0.00      0.00
08:01:35 AM       all     98.80      0.00      1.20      0.00      0.00      0.00
08:01:40 AM       all     98.00      0.00      2.00      0.00      0.00      0.00
08:01:45 AM       all    100.00      0.00      0.00      0.00      0.00      0.00
08:01:50 AM       all    100.00      0.00      0.00      0.00      0.00      0.00
08:01:55 AM       all     63.93      0.00      1.20     34.87      0.00      0.00
08:02:00 AM       all     92.03      0.00      0.80      7.17      0.00      0.00
08:02:05 AM       all     99.80      0.00      0.20      0.00      0.00      0.00
08:02:10 AM       all     99.60      0.00      0.40      0.00      0.00      0.00
08:02:15 AM       all     99.80      0.00      0.20      0.00      0.00      0.00
08:02:20 AM       all     99.40      0.00      0.60      0.00      0.00      0.00
08:02:25 AM       all     99.40      0.00      0.60      0.00      0.00      0.00
08:02:30 AM       all     99.20      0.00      0.80      0.00      0.00      0.00
08:02:35 AM       all     98.80      0.00      1.20      0.00      0.00      0.00
Average:          all     97.20      0.00      0.70      2.10      0.00      0.00
[oracle@prod01 bdump]$ sar 5 20
Linux 2.6.18-238.5.1.el5 (prod01.globe.local)     03/27/2012

08:03:50 AM       CPU     %user     %nice   %system   %iowait    %steal     %idle
08:03:55 AM       all      6.00      0.00      0.60     93.40      0.00      0.00
08:04:00 AM       all      8.42      0.00      0.80     90.78      0.00      0.00
08:04:05 AM       all     13.35      0.00      0.80     85.86      0.00      0.00
08:04:10 AM       all     27.51      0.00      0.20     72.29      0.00      0.00
08:04:15 AM       all      2.79      0.00      1.60     95.61      0.00      0.00
08:04:20 AM       all     58.80      0.00      1.20     40.00      0.00      0.00
08:04:25 AM       all     92.02      0.00      0.60      7.39      0.00      0.00
08:04:30 AM       all     99.20      0.00      0.80      0.00      0.00      0.00
08:04:35 AM       all     32.06      0.00      0.40     67.54      0.00      0.00
08:04:40 AM       all     77.64      0.00      1.20     21.16      0.00      0.00
08:04:45 AM       all     53.69      0.00      1.00     45.31      0.00      0.00
08:04:50 AM       all     40.40      0.00      0.80     58.80      0.00      0.00
08:04:55 AM       all     98.00      0.00      2.00      0.00      0.00      0.00
08:05:00 AM       all     70.34      0.00      1.20     28.46      0.00      0.00
08:05:05 AM       all     85.46      0.00      4.38     10.16      0.00      0.00
08:05:10 AM       all     69.46      0.00      0.60     29.94      0.00      0.00
08:05:15 AM       all     46.00      0.00      3.60     50.40      0.00      0.00
08:05:20 AM       all     71.34      0.00      1.00     27.66      0.00      0.00
08:05:25 AM       all     32.34      0.00      0.80     66.87      0.00      0.00
08:05:30 AM       all     18.40      0.00      1.20     80.40      0.00      0.00
Average:          all     50.16      0.00      1.24     48.60      0.00      0.00
[oracle@prod01 bdump]$ uname -a
Linux prod01.globe.local 2.6.18-238.5.1.el5 #1 SMP Mon Feb 21 05:52:39 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[oracle@prod01 bdump]$

# 2  
Tools yes - the math says it all

yes - as per your 'sar' output, the algebric sum of these 3 values will give you 100% ;

HTH
_____________
alexandre botao
# 3  
Total CPU is %user + %system. %iowait is idle time during which there happens to be IO activity.
# 4  
The very high %user figures can be caused by running sar with much to small a time interval on a system with only one or two cpu's. Try say 20 minutes sample interval not 5 seconds.

The %iowait is the percentage of i/o operations which had to wait for disc transfers. Worth looking at sar -d to see if you have a bottleneck on one or more of your discs.

Based on the statistics posted for just 4 minutes non-core time and knowing nothing about your hardware or software there appears to be a disc bottleneck not a cpu bottleneck ... but that's nothing unusual when Oracle is involved.
# 5  
@methyl, %iowait measures CPU time, not I/O time. It shows when a CPU is idle, while waiting for I/O to complete. There is only an indirect relation to I/O performance, and you can have a healthy system performing at high percentages of iowait.
# 6  
Thanks Scrutinizer, you are correct. I automatically read the column heading with its more usual meaning.
My unix sar has CPU idle% as a heading and a largely unrelated figure for I/O wait.
This version of sar is very strange because the figures in the sample always add up to 100% and there is no stated figure for genuine idle time ... unless perhaps this computer only has one CPU ?
# 7  
It is a "single-CPU vmware machine", I presume OP means a virtual machine. In the 3rd column it says, all CPU, so I think it would not matter if there were more vCPUs.

There is a %idle column, but apparently there has not been an idle period without I/O activity. The three columns on the left are busy time, the three on the right are idle time..

So I think it is like this:
TOTAL USER = %user + %nice
TOTAL CPU = %user + %nice + %system
TOTAL IDLE = %iowait + %steal + %idle

Last edited by Scrutinizer; 04-01-2012 at 09:10 AM..
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. Solaris

Total CPU usage on a server

hi, i am using solaris server. I want to find the total CPU usage on a server. Top command will give that result, but here that command is not working. So anyone can help me to find the total CPU usage. (2 Replies)
Discussion started by: Arasu123
2 Replies

2. Linux

How to calculate total CPU usage from SAR report?

Hi, I want to calculate the total cpu usage from the sar report. Say for example, Linux 2.6.24-21-generic (blade10) 09/10/2012 04:54:36 PM CPU %user %nice %system %iowait %steal %idle 04:54:37 PM all 0.00 0.00 0.00 0.00 ... (1 Reply)
Discussion started by: rohitmd
1 Replies

3. Linux

System Went panic after CPU usage high

Hi All, Yesterday my Linux server went panic and even a small command took a lot of time to run. When i monitored pl find the below output Cpu(s): 0.1%us, 98.4%sy, 0.0%ni, 1.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st the time spent on kernel mode is 98 % and also idle time is around 1.5 %...... (4 Replies)
Discussion started by: jegaraman
4 Replies

4. UNIX for Dummies Questions & Answers

Total cpu usage in percent(%)

How to determine the total percentage cpu usage of a server having 4 cpu cores(quad core)? (3 Replies)
Discussion started by: proactiveaditya
3 Replies

5. Ubuntu

High System CPU Usage

I am running a Dell PE R815 with 4 x AMD 12 core CPUs with 128GB of RAM and a RAID 5 array of 6 SAS disks. This is an HPC application and is definitely CPU bound, however once I run 16 of these processes (thus pinning 16 cores) the work performed slows down dramatically, to maybe 5 or 10% of what... (2 Replies)
Discussion started by: mowmentous
2 Replies

6. UNIX for Dummies Questions & Answers

HOWTO - Total memory and CPU usage ... without top?

Hi all, Is it possible to get total memory usage and free memory usage without top? By Googling I found for total memory usage, use vmstat, for CPU, use mpstat, for disk I/O use iostat, is this correct? Will using sar gives the same result as ALL of these three (3) commands? What about if I... (2 Replies)
Discussion started by: newbie_01
2 Replies

7. Shell Programming and Scripting

Finding total Percentage CPU usage

Hi, How can I find total CPU usage in percentage? e.g. if my system has 8 CPUs and I want to list total usage for all of them, is it possible through a command? I have tried some of the commands like top, mpstat, sar. The output of those commands has to be manipulated to derive the percentage... (14 Replies)
Discussion started by: jal_capri
14 Replies

8. Solaris

Multi CPU Solaris system shows 100% CPU usage.

Hello Friends, On one of my Solaris 10 box, CPU usage shows 100% using "sar", "vmstat". However, it has 4 CPUs and prstat and glance are not showing enough processes to justify high CPU utilization. ========================================================================= $ prstat -a ... (4 Replies)
Discussion started by: mahive
4 Replies

9. Shell Programming and Scripting

Total usage memory by user

Hi, When running top on linux redhat machine , i see that i have 16gb of memory in my machine and about 14.5gb of memory are in use: Mem: 16395780k total, 14970960k used, 1424820k free, 370264k buffers Swap: 4192956k total, 25824k used, 4167132k free, 12029400k cached How can i... (3 Replies)
Discussion started by: yoavbe
3 Replies

10. HP-UX

CPU usage per user

Hello everybody, How can we proceed to measure the CPU used par a user on unix HPUX ? there some commands or tools ? Thank you in advance. (4 Replies)
Discussion started by: mlaiti
4 Replies

Featured Tech Videos