Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vstat(1) — HP-UX 5.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

time(1)

times(2)

chatr(1)

ld(1)

uconfig(1M)

VSTAT(1)

Series 500 Only

NAME

vstat − collect virtual memory performance statistics

SYNOPSIS

vstat command

Remarks:

Implemented only on the Series 500. 

DESCRIPTION

Vstat uses system(3S) to execute the specified command. Upon completion, vstat prints the real, user, and system times for command plus counts of several Virtual Memory operations that occurred while command was being executed.  Statistics are printed to stderr. 

Virtual memory statistics are kept on a system-wide basis only, so all system Virtual Memory activity during the command’s execution is reported by vstat.

Two kinds of logical memory objects are supported by the Series 500 processor: unpaged segments and paged segments.  Unpaged segments are variable length objects that are typically used for code segments, stack segments, and some data segments.  On the other hand, paged segments are divided into one or more pages of equal size, and can only be used for data.  Paged segments are not limited to 512K bytes like unpaged segments.  Thus, a paged segment can provide a large address space and efficient memory use because unused pages can be swapped to backing storage.  While an unpaged segment provides faster memory access time, it must be entirely resident when accessed.  This difference in memory efficiency can be illustrated by considering a program that accesses only the first two Kbytes of a 200-Kbyte array.  If the array is allocated in a paged segment, only those pages that contain the first two Kbytes need be resident in memory.  If the array is allocated in an unpaged segment, the entire 200 Kbyte segment must be resident in order to access any given part of the array. 

Separate memory management algorithms are used for paged segments and unpaged segments.  The system keeps statistics for the operation of each algorithm. 

Statistics reported by vstat include:

time information Process time information as in time(1). 

page faults Attempted accesses to addresses within absent pages.  A page fault can be handled by recovering the page from the page cache, reading the page from backing storage, demand loading the page from the a.out file, or creating a new page in memory.  The current page size for the system can be determined with uconfig(8). 

page writes Pages written to backing storage. 

page reads Pages read from backing storage. 

page dloads Pages demand loaded from an a.out file.  This indicates that demand loading has been specified by chatr(1). 

pages replaced Pages moved from a working set to the page cache by the working set scan algorithm.  Replaced pages are not immediately swapped to backing storage. 

pages init’d Pages created and initialized to all zeroes in memory. 

normal scans The number of working set scans performed by the paging system. 

mr scans The number of FIFO scans performed by the paging system.  FIFO scans are an override of the normal working-set algorithm. 

segment faults Attempted accesses to addresses within absent unpaged segments.  A segment fault can be handled by reading the segment from backing storage, demand loading the segment from the a.out file, or creating a new segment in memory. 

segment writes/bytes Segments/bytes written to backing storage. 

segment reads/bytes Segments/bytes read from backing storage. 

segment dloads/bytes Segments/bytes demand loaded from an a.out file.  This indicates that demand loading has been specified by chatr(1). 

segment inits/bytes Segments/bytes created and initialized to all zeroes in memory. 

Several factors can keep the numerical totals from matching correctly.  For example, simultaneous faults to shared code segments combined with the effects of the clustering algorithm in the paging system can prevent the total number of reads, demand loads, and inits from equalling the number of faults. 

EXAMPLES

The command:

vstat ls -l /bin

creates a shell to execute  ´ls -l /bin´ and reports the resulting statistics to stderr. 

The command:

vstat sleep 60

executes ´sleep 60´ and has the effect of reporting on all system Virtual Memory activity over a 60 second period.  Note that the times information is relevant only to the sleep command and is not interesting in this example. 

The most practical use of vstat is to determine whether a program is virtual memory bound or CPU bound.  Accurate determination requires that no other system activity occur during command execution.  If user time plus system time (total CPU time) accounts for all or most of the elapsed time, the program is CPU bound and virtual memory activity is probably not a major factor.  If elapsed time is greater than CPU time, the statistics for virtual memory I/O activity will show whether virtual memory is causing idle time.  For page I/O, add the total number of page reads, page writes, and page dloads, then multiply by 30 msec.  For segment I/O, add the number of segment reads, segment writes, and segment dloads, then multiply by 80 msec.  If these times account for a significant portion of the idle time, the program is probably virtual memory bound.  The numbers for page and segment I/O time are gross approximations.  They are useful for general analysis, but should not be used to predict performance. 

SEE ALSO

time(1), times(2), chatr(1), ld(1), uconfig(1M)
The section on Memory Management in the Concepts chapter of the HP-UX System Administrator Manual for the HP 9000 Series 500.

WARNINGS

Vstat requires an effective user id of root to execute. 

Statistics include the creation of the shell by the system(3s) library call. 
 
 
 

Hewlett-Packard Company  —  April 12, 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026