Linked by David Adams on Thu 20th Nov 2008 04:19 UTC
General Unix Linux and other Unix-like operating systems use the term "swap" to describe both the act of moving memory pages between RAM and disk. It is common to use a whole partition of a hard disk for swapping. However, with the 2.6 Linux kernel, swap files are just as fast as swap partitions. Now, many admins (both Windows and Linux/UNIX) follow an old rule of thumb that your swap partition should be twice the size of your main system RAM. Let us say I’ve 32GB RAM, should I set swap space to 64 GB? Is 64 GB of swap space really required? How big should your Linux / UNIX swap space be?
Thread beginning with comment 337891
To view parent comment, click here.
To read all comments associated with this story, please click here.
MattPie
Member since:
2006-04-18

It's because a SWAP partition doesn't require interaction with the VFS.

Also, swap files that grow fragment over time, which makes the disk head jump around looking for blocks that should be contiguous. Granted, having a swap file on a separate part of the disk isn't much better, but the performance will be constant, not degrading over time.

Reply Parent Score: 2