Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Administering a System: Managing Disks and Files
Managing Swap and Dump
Chapter 6664
Designing Your Swap Space Allocation
When designing your swap space allocation:
• Check how much swap space you currently have.
• Estimate your swap space needs.
• Adjust your system’s swap space parameters.
• Review the recommended guidelines.
Checking How Much Swap Space You Currently Have
Available swap on a system consists of all swap space enabled as device
and file system swap. To find how much swap space is presently available
on your system and how much is being used, use SAM or run the
command swapinfo.
The output of swapinfo tells you the type of swap by location, how much
of it is available, how much is used, how much is free, and how much is
reserved but not allocated. For more information, refer to swapinfo (1M).
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. As a result of the
larger physical memory limits of the 64-bit hardware platforms
introduced at 11.0, you will need to significantly increase the amount of
swap space for certain applications on these systems.
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.
Typically, 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, make swap space
to be roughly two to four times your physical memory.
Swap space usage increases with system load. If you are adding (or
removing) a large number of additional users or applications, you will
need to re-evaluate your swap space needs.