SUMMARY: vmstat & iostat fields

From: Leonard, Roger <rleonard_at_cvty.com>
Date: Thu, 18 Feb 1999 08:10:04 -0500

Many thanks to Sylvain Robitaille and Alan Nabeth.

My original posting was:

Question 1:
> When running vmstat, the last 3 fields are the cpu utilization for user,
> system & idle. My question is what constitutes user cpu utilization and
> system cpu utilization?

The answer is:
A brief description of this is found in the times(3) manual page, but a
better detailed explanation is in "Advanced Programming in the UNIX
Environment", by W. Richard Stevens (ISBN 0-201-56317-7 Addison-Wesley),
where on page 19 the author explains Unix Time Values:

    The user CPU time is the CPU time that is attributed to user
    instructions. The system CPU time is the CPU time that can be
    attributed to the kernel, when it executes on behalf of the process.
    For example, whenever a process executes a system service, such as
    read or write, the time spent within the kernel performing that
    system service is charged to the process.

My second question was:
> I have a 4100 running PeopleSoft that has 0% idle time, 90% system
> time and 10% user time. Are the processes running under the psoft
> product considered user time or system time?

The answer was:
As you can see from the above explanation, both. Though the figures
above may seem drastic, they alone don't indicate that anything's wrong.
0% idle time could simply mean the system is happily chugging along,
with susbsystems (such as disks) dutifully keeping up with CPU requests.
On the other hand, if this condition is persistent, you may be in need
of additional CPU power.
The application may be in-efficient with system calls, (small disk
accesses repeatedly, rather than fewer larger accesses), but I don't
_think_ anything is seriously wrong here.

The 3rd question was:
> If not considered system time, then what could be nailing my CPU's from
> the system?

The answer was:
Is there anything else running on the system? A look at the load average
should help you determine if the condition is caused simply by a large
number of processes being run. Context switching, for example, counts as
system time.

The fourth question was:
> When running ps auxww the 3rd, 4th and 5th fields are %CPU, %MEM and VSZ.
> Adding up all the percents of CPU total way more than 100 so how do I
> interpret that number?

The answer was:
How many CPUs are in the system? Your total should be equal to
approximately 100 times the number of CPUs. You're really only
interested in the process(es) using the most CPU anyway. Don't worry too
much if the total is not what you expect.

The fifth question was:
> Also is the %MEM field showing the amount of virtual memory that
> process is using?

The answer was:
It's the percentage of physical memory occupied by the process. If your
system spends some time paging, you can find which process(es) is
responsible by looking here.
  
> Is the VSZ showing the virtual size of the process?
The amount of virtual, non-shared memory used by the process, (I believe
this is in kilobytes).
Received on Thu Feb 18 1999 - 13:12:54 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT