Swap File

The swap file (SWAPPER.DAT) is the file where OS/2 2.0 stores those memory pages it moves out of memory. The SWAPPER.DAT file defaults to the system startup partition. This can be changed during installation or later in the CONFIG.SYS file. When the path and default size for the swap file are changed in the CONFIG.SYS file, it takes effect the next time the operating system is started.

The operating system automatically pre-allocates the SWAPPER.DAT file based on the size (in MB) of installed memory. This optimizes performance and reduces disk fragmentation (file scattering).

NOTE:
When necessary, the operating system increases the swap file size beyond the initial allocation.

To change the pre-allocated size in the CONFIG.SYS file, modify the SWAPPATH= statement (sizes are specified in KB). To customize the swap file size for a particular environment, modify the default value to reflect the smallest default value, according to Table 1 (for example, 2MB); then restart the system. Start the desired application, view the OS2 \SYSTEM \SWAPPER.DAT file and record the size periodically. Take the largest size that you record and add 1-2MB. If this size is larger than the recommended size in Table [*], choose the larger value.

The MINFREE parameter in the SWAPPATH= statement determines when the partition containing the SWAPPER.DAT file is running out of space. The first warning that displays indicates that there is less space than the amount in the MINFREE parameter. To avoid receiving the warning message, delete some space or adjust the MINFREE value to a smaller value.


Table: Default SWAPPER.DAT Settings at Installation Time
MEMORY (MB) MINFREE (KB) INITIAL SIZE (KB)
4 4096 6144
5 4096 5120
6 4096 5120
7 2048 4096
8 2048 4096
9 2048 3072
10 2048 3072
11 through 32 2048 2048