Swap Space is used on Unix and Linux systems to provide additional pseudomemory resources. In other words, if you try to run so many processes that they won't all fit into memory at the same time, the operating system will swap them in and out of the swap space.
Swap space can be either disc partition(s) (a.k.a. slice(s)) dedicated to the task, and/or file(s) held within the file system. Although the operating system will attempt to swap as efficiently as possible, it does turn into a heavy resource burden sometimes and it's worth tuning your file system layout to take note of this:
a) Use Swap partitions rather than files (but files are great for a temporary expansion if you need it)
b) If you have multiple disc drives of the same speed, spread the swap area between them
c) If you have multiple disc drives of different speeds, put you swap space on the fastest
d) Keep the swap space in the middle of the disc / close to often used files to mimimise head movements
e) If you are using network drives, do NOT put any swap space onto a remote drive!
(written 2004-12-16, updated 2006-06-05)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
A162 - Web Application Deployment - Backups and File System Management [4063] Backups by crossover between network centres - setting up automatic scp transfers - (2013-04-13)
[4056] An overpractical test of our backup strategy! - (2013-03-30)
[2299] How much space does my directory take - Linux - (2009-07-20)
[1893] Some Linux and Unix tips - (2008-11-18)
[1801] Will your backups work if you have to restore them? - (2008-09-18)
[1765] Dialects of English and Unix - (2008-08-21)
[1648] The tourists guide to Linux - (2008-05-20)
[1439] Linux / Unix - layout of operating system files - (2007-11-20)
[1288] Linux run states, shell special commands, and directory structures - (2007-08-03)
[1023] Finding public writeable things on your linux file system - (2007-01-06)
[1013] Copy multiple files - confusing error message from cp - (2006-12-30)
[754] tar, jar, war, ear, sar files - (2006-06-10)
[735] Boys will be boys, saved by Ubuntu - (2006-05-27)
[703] Copying files and preserving ownership - (2006-04-28)
[593] Finding where the disc space has gone - (2006-02-06)
[554] What backup is adequate? - (2006-01-04)
[334] Symbolic links and hard links - (2005-06-02)
4de6
Some other Articles
Automatic service upgradesSignageRailway train service, Melksham stationLinux - where to put swap spaceAladdin, or careful what you wish.Coffee StandardsConfessionFish stocksProgramming in isolationRecent technical articles