Installation guide

clusters of pages, the operating system selects a low priority process and
reclaims all the physical pages that it is using. It does this by writing all of
its modified virtual pages to swap space. This operation is called a swapout.
Swapouts typically occur on systems that are memory constrained.
7.1.2.1 How Swap Space Is Allocated
Swap space is initially allocated during system installation. You can add
swap space after the installation by including swap space entries in the
/etc/fstab file and then rebooting. Additionally, you can use the swapon
command to add more swap space–overriding the /etc/fstab
definitions–until the next time the system is rebooted. Refer to Section 7.4
and the swapon
(8) reference page for more information.
See Section 7.10 for information about how this command interacts with
overlapping partitions. The amount of swap space that your system
requires depends on the swap space allocation strategy that you use and
your system workload. Strategies are described in the following section.
7.1.2.2 Estimating Swap Space Requirements
There are two strategies for swap space allocation: immediate mode and
deferred or over-commitment mode. The two strategies differ in the point in
time at which swap space is allocated. In immediate mode, swap space is
allocated when modifiable virtual address space is created. In deferred
mode, swap space is not allocated until the system needs to write a
modified virtual page to swap space.
_______________________ Note _______________________
The operating system will terminate a process if it attempts to
write a modified virtual page to swap space that is depleted.
Immediate mode is more conservative than deferred mode because each
modifiable virtual page is assigned a page of swap space when it is created.
If you use the immediate mode of swap space allocation, you must allocate
a swap space that is at least as large as the total amount of modifiable
virtual address space that will be created on your system. Immediate mode
requires significantly more swap space than deferred mode because it
guarantees that there will be enough swap space if every modifiable virtual
page is modified.
If you use the deferred mode of swap space allocation, you must estimate
the total amount of virtual address space that will be both created and
modified, and compare that total amount with the size of your system’s
Administering the UNIX File System 7–5