Next | Prev | Up | Top | Contents | Index

Swap Space

The IRIX operating system uses a portion of the disk as swap space for temporarily saving part or all of a user's program when there is not enough physical memory to contain all of the running programs. If you run many very large programs, you might run out of swap space. For a complete discussion of the dynamics of paging and swapping, see "Checking for Excessive Paging and Swapping".

Use sar -p, sar -w , sar -q, swap -s, and swap -l to monitor paging and swap space use. If you find that you are running out of swap space, two solutions are available: you can add more memory, or you can add more swap space. Adding swap space does not improve the performance of large programs, but it permits them to run successfully.

Under sar(1), swapping of whole processes is reported with the -w flag; but this is not what causes performance problems, the problems come from the excess or slow I/O involved in paging.

IRIX allows programs occupying more space than the system limit to run, since each program is only partially loaded into memory at any given time. One of the effects of this policy is that IRIX has to preallocate swap space based on likely future usage, and sometimes this prediction is incorrect. When the swap space is actually needed, IRIX allocates the most convenient available space, not the specific space allocated. So the physical allocation is separate from the accounting allocation.

If your system preallocates all your swap space, but the space has not yet been used, it may appear that your system is running out of swap space when it is not. It is possible that your system has simply preallocated the rights to future swap space to existing processes, and no new processes can allocate space due to the strict swap space accounting in this version of IRIX.

In previous versions of IRIX, available swap space accounting was collected, but ignored by default. If a system actually ran out of physical swap space and more swap space was immediately needed, the system made the space available by terminating processes with low priority (such as batch jobs). This strategy is call ''lazy'' accounting. The kernel tunable parameter availsmem_accounting could be set to enforce strict swap space accounting. The drawback of lazy accounting is that when IRIX ran out of physical swap space, processes were terminated before they are complete.

In the current version of IRIX, strict swap space accounting is always in effect, but the ability to add both physical and virtual swap space through ordinary system files allows the administrator to add swap space or to effectively turn off strict swap space accounting, without having to either repartition the disk or reconfigure and reboot the system.


Adding Virtual Swap Space
Listing Swap Space With The swap -l Command
Checking Swap Activity With The swap -s Command
Increasing Swap Space on a One-Disk System
Increasing Swap Space on a Multidisk System

Next | Prev | Up | Top | Contents | Index