3.1.13 Swap space
I use the following guidelines for swap space:
-
Each swap partition is < 128MB (if using an old 2.0 kernel), < 2GB (with
recent kernels)
-
Total = either (1 to 2 times installed RAM) or (128MB to 2GB) as a guideline
-
Spread them on different drives and mount all of them with
sw,pri=1 options in /etc/fstab
. This ensures that
the kernel does a striping RAID of the swap partitions and offers the maximum
swap performance.
-
Use a central portion of the hard disk when possible.
Even if you never need it, some swap space (128MB) is desirable so the system
will slow down before it crashes hard with a program which leaks memory.