Reason for abnormal value in vmstat output

Hi,

Recently from the vmstat output in the image attached, the first line of the cpu idle column shows a value of 15. Although the subsequent values show higher than 90, is there a reason why the first value is so low?

Is this a problem?

Thanks.

Hi,

There could be any number of reasons for the CPU having so much resource assigned to a user task - in this case it could even be the fact that you have been running "vmstat" and the system has had to fetch it from disk and run the binary.

If your system has "sar" installed, you could run sar -u 5 20 in one shell and run your "vmstat" command in an other - you should be able to see a more or less matching picture.

Regards

Gull04

From man vmstat (on linux but it's the same on any operating system) :

DESCRIPTION
       vmstat  reports  information about processes, memory, paging, block IO,
       traps, disks and cpu activity.

       The first report produced gives averages since the last reboot.   Addi
       tional  reports  give information on a sampling period of length delay.
       The process and memory reports are instantaneous in either case.

So, since the last reboot CPU line is average.

What is troublesome here that the line shows 85% average system utilization, 0% user and 15% idle.
This means 85% of time in average from last reboot is spent in kernel code.

On normal operations on system, minimal time should be spent in kernel and most in user.
This can be different with, for instance, when using high compression and dedup on zfs, system line can go a lot higher then user.

What is that server doing (database, file server, java app etc.) ?
Do you have metrics for longer periods ?
What is your number of cores and load average ?

Regards
Peasant.

Hi Peasant,

Thanks for the detailed explanation. Answers :

What is that server doing (database, file server, java app etc.) ?
It has database, and the application that is used to register user information into the database.
Do you have metrics for longer periods ?
Unfortunately not.
What is your number of cores and load average ?
Number of cores : 16
Load average : 0.23, 0.25, 0.25

  1. Database kind and the way it stores data files (filesystems or ASM) ?
    This effects operating system configuration, especially if you have zfs filesystems.

  2. You should really have some metrics, at least via SNMP or crontab.
    Without them, analysis will be much more difficult if not impossible.

Current load average (in the time of execution 1,5,15 minutes) says the machine is heavily underutilized CPU wise.

In the past 1,5,15 minutes one core would run that and have free time :slight_smile:

Hope that helps
Regards
Peasant.