HP-UX Reference (11i v2 03/08) - 1M System Administration Commands N-Z (vol 4)

s
swapinfo(1M) swapinfo(1M)
PCT USED The percentage of capacity in use, based on Kb USED divided by Kb AVAIL; 100% if Kb
AVAIL is zero.
START/LIMIT
For device paging areas, START is the block address on the mass storage device of the start
of the paging area. The value is normally 0 for devices dedicated to paging, or the end of the
file system for devices containing both a file system and paging space.
For file system paging areas, LIMIT is the maximum number of 1-Kbyte blocks that will be
used for paging, the same as the limit value given to
swapon. A file system LIMIT value of
none means there is no fixed limit; all space is available except that used for files, less the
blocks represented by minfree (see tunefs (1M)) plus RESERVE.
RESERVE For device paging areas, this value is always ‘‘—’’. For file system paging areas, this value is
the number of 1-Kbyte blocks reserved for file system use by ordinary users, the same as the
reserve value given to swapon.
PRI The same as the priority value given to
swapon. This value indicates the order in which
space is taken from the devices and file systems used for paging. Space is taken from areas
with lower priority values first. priority can have a value between 0 and 10. See "Paging
Allocation" below.
NAME For device paging areas, the block special file name whose major and minor numbers match
the device’s ID. The swapinfo command searches the /dev
tree to find device names. If
no matching block special file is found,
swapinfo prints the device ID (major and minor
values), for example, 28,0x15000.
For file system swap areas, NAME is the name of a directory on the file system in which the
paging files are stored.
Paging Allocation
Paging areas are enabled at boot time (for device paging areas configured into the kernel) or by the
swapon command (see swapon(1M)), often invoked by /sbin/init.d/swap_start
during system
initialization based on the contents of
/etc/fstab. When a paging area is enabled, some portion of
that area is allocated for paging space. For device paging areas, the entire device is allocated, less any
leftover fraction of an allocation chunk. (The size of an allocation chunk is controlled by the tunable
parameter
swchunk, and is typically 2 MB.) For file system paging areas, the minimum value given to
swapon (rounded up to the nearest allocation chunk) is allocated.
When a process is created, or requests additional space, space is reserved for it by increasing the space
shown on the
reserve line above. When paging activity actually occurs, space is used in one of the
paging areas (the one with the lowest priority number that has free space available, already allocated),
and that space will be shown as used in that area.
The sum of the space used in all of the paging areas, plus the amount of space reserved, can never exceed
the total amount allocated in all of the paging areas. If a request for more memory occurs which would
cause this to happen, the system tries several options:
1. The system tries to increase the total space available by allocating more space in file system paging
areas.
2. If all file system paging areas are completely allocated and the request is still not satisfied, the sys-
tem will try to use memory paging as described on the
memory line above. (Memory paging is con-
trolled by the tunable parameter swapmem_on, which defaults to 1 (on). If this parameter is
turned off, the memory line will not appear.)
3. If memory paging also cannot satisfy the request, because it is full or turned off, the request is
denied.
Several implications of this procedure are noteworthy for understanding the output of
swapinfo:
Paging space will not be allocated in a file system paging area (except for the minimum specified
when the area is first enabled) until all device paging space has been reserved, even if the file sys-
tem paging area has a lower priority value.
When paging space is allocated to a file system paging area, that space becomes unavailable for user
files, even if there is no paging activity to it.
Requests for more paging space will fail when they cannot be satisfied by reserving device, file sys-
tem, or memory paging, even if some of the reserved paging space is not yet in use. Thus it is
HP-UX 11i Version 2: August 2003 2 Hewlett-Packard Company Section 1M789