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 337895
To read all comments associated with this story, please click here.
The rule is 2x because of grandma
by Bounty on Thu 20th Nov 2008 17:27 UTC
Bounty
Member since:
2006-09-18

The rule is 2x because of grandma. She has no idea how much memory she'll be using. She doesn't know how big her memory footprint is for photo editing or digital scrapbooking. Or for playing solitare for that matter. We know RAM is expensive, that's one reason why eMachines exist. HDD's are cheap, and a fractional amount for space on that drive is even cheaper.

If you are a 3leet haxor linux admin with 1 server handling 28872 programs spread across 376265.2 users, you probably know how much RAM and swap you need. Rules of thumb don't apply to you admin/hacker.

If you are cheap and got 512MB ram, and have 1 GB swap, you probably told someone you just want email.... and your setup is fine. If you have 2 GB of ram and 4 GB of swap (on your 300GB hard drive) you probably told someone you will use the net and some programs, and might do some 'stuff' with photo's. And your setup is fine too..... as a rule of thumb. Swap is cheap and users are unpredictable.

Reply Score: 2