HP-UX System Administrator's Guide: Overview
Unless the amount of physical memory on your system is extremely large, the minimum
amount of swap space should equal the amount of physical memory on the system. In
general, size your server’s swap space to be roughly two to four times the amount of
physical memory that is used by HP-UX on your server, nPartition, or virtual partition.
Swap space usage increases with system load. If you are adding (or removing) a large
number of users or applications, you will probably need to re-evaluate your swap space
needs.
NOTE: To get a snapshot of the total amount of swap space currently being used, use
the command:
# /usr/sbin/swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
reserve - 257 -257
memory 1940 562 1378 29%
total 6036 819 5217 14% - 0 -
This number will vary over time, depending on the current mix of applications running,
but if the total percentage used is regularly high, roughly 90% or greater, then you
probably need to add more swap space.
Once you know or suspect that you will have to increase (or decrease) your swap space,
you should estimate your swap space requirements.
You can estimate the amount of swap space you need by adding the memory
requirements of the applications you expect to run (simultaneously) on your system
to the amount of physical memory you have.
Enabling Swap Space
When HP-UX is in the earliest stages of the boot sequence, the system begins by paging
on only a single device so that only one disk is required at boot time.
During the processing of the startup script /sbin/init.d/swap_start, calls to
swapon enable any additional paging areas, if any are defined in the file /etc/fstab.
Should you find the need for additional paging space while your system is running,
you can also run the swapon command to manually enable additional space. See the
swapon(1M) and fstab(4) manpages for details.
Disabling Swap Space
Sometimes, you can disable swap space. In order to be able to disable paging to swap
areas:
72 Major Components of HP-UX