Wiki-UX / Swap
Jump to: navigation, search


A temporary form of data storage is swap space. It should be noted that HP-UX does not "swap" any more, it pages and, as a "last resort" deactivates processes. The process of deactivation replaces what was formerly known as swapping entire processes out.

While executing a program, data and instructions can be paged (copied) to and from secondary storage, if the system load warrants.

Swap space is initially allocated when the system is configured. HP-UX supports two types of swap space: device swap and file system swap. Device swap is allocated on a disk "outside" of any file system space and can be:

  1. A entire disk
  2. An area on a disk
  3. A logical part of a physical disk

If the entire disk hasn't been designated as swap, the remaining space on the disk can be used for a file system. File system swap space is allocated from a mounted file system and can be added dynamically to a running system. Device swap can also be added dynamically to a running system. Sam or the swapon() command can be used to enable device or file system swap.

NOTE: File-system swap has significantly lower performance than device swap. The I/O for file system swap will contend with user I/O on that particular file system. Using file system swap space should be avoided. Once allocated, you cannot remove either type of swap without rebooting the system. HP-UX uses a swap space reservation method (to insure it has space available), but only allocates the space when it actually needs to write to it.


This page was last modified on 28 July 2010, at 03:03. This page has been accessed 3,030 times.