1833860 Members
2280 Online
110063 Solutions
New Discussion

Re: sar vs vmstat

 
SOLVED
Go to solution
Darrell Allen
Honored Contributor

sar vs vmstat

Hi all,

Once upon a time I heard that sar was not as accurate as vmstat in reporting cpu utilization because of timeslicing. I believe this is true. I've seen sar report 50% idle time on my servers where vmstat would be showing 90 - 95% idle.

Can anyone enlighten me?

Thanks,
Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor
Solution

Re: sar vs vmstat

Hi Darrel,

Both sar and vmstat use pstat calls to collect the the kernel counters. So, theoritically the reports should be the same.

The CPU in sar report is split into usr, sys and wio while CPU is reported only interms of usr and sys through vmstat. wio is waiting for io to complete otherwise idle. So, I guess the idle value in vmstat is nothing but a sum of wio and idle in sar report.

Does this make sense?.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Michael Tully
Honored Contributor

Re: sar vs vmstat

Hi Darrell,

As Sridhar has pointed out, both sar and
vmstat both use 'pstat' for the accumulation
of kernel counters. I have never really used
these two tools for any sort of reporting.
I've really only used glance and mwa. Have
you tried glance to get a comparison. It may
actually point out the problem.

-Michael
Anyone for a Mutiny ?
Darrell Allen
Honored Contributor

Re: sar vs vmstat

Well, I should have read the manual more closely. It just never dawned on me that the difference in idle time was simply that sar breaks out the "idle while waiting on I/O".

An instructor in a class a number of years ago had said sar wasn't as accurate as vmstat. In my ignorance, I accepted his statement and never questioned it. It sounded logical.

I really feel stupid when I can't see something so simple.

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