Debunking the “2x Ram as Swap Space” Rule

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?

37 Comments

  1. 2008-11-20 6:02 am
    • 2008-11-20 7:05 am
      • 2008-11-20 11:21 am
      • 2008-11-20 10:18 pm
      • 2008-11-23 11:35 am
  2. 2008-11-20 7:00 am
  3. 2008-11-20 9:55 am
  4. 2008-11-20 10:08 am
    • 2008-11-20 10:32 am
      • 2008-11-21 1:22 pm
    • 2008-11-20 3:59 pm
    • 2008-11-20 10:30 pm
  5. 2008-11-20 10:39 am
  6. 2008-11-20 11:03 am
  7. 2008-11-20 12:47 pm
    • 2008-11-20 1:36 pm
      • 2008-11-20 5:11 pm
      • 2008-11-20 5:16 pm
        • 2008-11-20 5:42 pm
    • 2008-11-21 5:06 am
  8. 2008-11-20 1:04 pm
    • 2008-11-20 1:38 pm
      • 2008-11-20 1:54 pm
        • 2008-11-20 5:55 pm
          • 2008-11-20 6:25 pm
    • 2008-11-21 12:53 am
  9. 2008-11-20 1:27 pm
  10. 2008-11-20 2:59 pm
  11. 2008-11-20 5:27 pm
  12. 2008-11-20 5:47 pm
  13. 2008-11-20 10:01 pm
    • 2008-11-20 10:15 pm
    • 2008-11-21 1:14 am
  14. 2008-11-20 11:11 pm
  15. 2008-11-21 12:22 am
  16. 2008-11-21 3:16 am
    • 2008-11-24 4:43 am