Job Statistics: vmstat: Descriptions
Next: I/O Statistics: iostat
Up: Managing the System
Previous: Processes: ps
The avm column under memory
denotes active virtual memory,
that is, memory which resides on
the slow, hard disk and not in the fast electronics. The number in the avm
column is the number of pages, usually of 4 MB size, being used by
that process. This is a good indication of how much memory your
system is using; if this number is significantly larger that the size
of RAM in your computer, then the system may be spending too much time
reading data onto and back from the hard disk (paging). In these
cases performance could be increased by adding more RAM.
The fre column under memory in the listing is the number of pages,
again of 4 MB size, of RAM that is unused.
- This is, however,
an unreliable measure of free memory since the table of free pages is
not updated until the system needs more pages.
The page columns in the vmstat listing tracks the
paging activity of the system.
- This is a specific measure of how
virtual memory is being used by your system. The ``page in'' and
``page out'' subcolumns, pi and po, tell how many pages of
virtual memory are being read in from disk or written out to disk.
While some paging activity is normal during program startup, if there
is such extensive enough use of virtual memory as to make pi
and po nonzero for extended periods of time, then the system
has too little RAM to satisfy the needs of all programs during these
periods.
The columns in the vmstat listing under cpu indicate
how the CPU is spending its time. The numbers are the
percentages of CPU time for the past interval spent on:
- us ``user time,''
- that is, doing things like running calculations,
manipulating data, and drawing graphics and the normal activities of
user programs;
- sy ``system time,''
- that is, kernel activities such as input/output;
- id ``idle time,''
- that is, something we all wish we had more of;
- wa ``wait time,''
- that is, the time spent waiting on a device to be ready,
usually for input/output. A system well matched with its CPU should
spend most of its time
in users' work since they are the ones paying the bills. While programs
containing lots of I/O can push the system time up, in normal use it
should be low, say below 33%, even when the system is transferring
large files.
It is illuminating to start vmstat before submitting a
large, numerically intensive program and then redirect vmstat's output into a file you can study later. As you observe the
reports issued by vmstat every few seconds, you should be able
to see how well the system preformed while running your program and
possibly spot problems like excessive paging or input/output.
Next: I/O Statistics: iostat
Up: Managing the System
Previous: Processes: ps