HP-UX System Administrator's Guide: Overview HP-UX 11i v3 (B3921-90011, September 2010)

If you choose to use the pseudo swap capability (actually, it is enabled by default), an amount
of pseudo swap space equal to 7/8ths of the amount of physical ram available to your server,
nPartition, or virtual partition is used as pseudo swap.
Lazy Swap
Another technology that takes advantage of the fact that not all swap space that is reserved is
actually used is lazy swap. The lazy swap feature causes HP-UX to not reserve swap space for a
process-private page until the associated process actually modifies the page. This can significantly
reduce the amount of allocated swap space.
Lazy swap is configured on a process by process basis. There are programmatic ways to enable
lazy swap or a user can modify a binary executable file to enable lazy swap by using the +z
option to the chatr command. See the chatr(1) manpage for details.
Primary and Secondary Swap Space
HP-UX must have at least one device swap area available when it boots. This area is known as
the primary swap area.
4
Primary swap, by default, is located on the same disk as the root file
system (though in a different logical volume). Use the swapon command (see swapon(1M)) to
define swap space.
Other swap space may be used in addition to primary swap. This is known as secondary swap
space. If you are using device swap as your secondary swap space, for better performance allocate
the secondary swap space on a disk drive other than where the primary swap is located.
File system swap is always secondary swap.
Figure 3-6 Swap Space - Possible Locations for Paging
Swap
Lvol3
/opt
lvol1
File System
Swap
Dedicated
Swap Volume
Device Swap
(end of device)
Dedicated
Swap Device
Estimating Your Swap Space Needs
Your swap space must be large enough to hold all the processes that could be running at your
system’s peak usage times.
If your system performance is good, and, in particular, if you are not getting swap errors such
as Out of Memory or those to the effect that a process was killed due to no swap space, then
your system has adequate swap space.
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
servers 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.
4. Primary swap is not mandatory if pseudo swap is enabled, however, it is strongly recommended.
Storage on HP-UX 61