
On Mon, 21 Nov 2011, Julien Goodwin <luv-lists@studio442.com.au> wrote:
If I let the installer do it's own thing with HDD partitioning, it will set up a swap size of 2 x RAM. But that's not what I want. 2 x the current amount of RAM will be inadequate once I install more. So, if I set up 8GB of swap, expecting that I'll eventually have 4GB of RAM, is having too much swap going to be a problem in the meantime? Is there a downside to having a large amount of swap?
For the last few years I've gone to using a flat 2GB of swap. My theory is that hard drives are *so* slow (at 100MB/sec that's 20sec to fill it) that you'd much rather services be killed by the OOM killer then wait minutes for a response (when you're fairly likely just to need to kill it anyway). This is for laptops, desktops and servers (and several hundred of them at my last job were built this way).
http://etbe.coker.com.au/2007/09/28/swap-space/ The above URL is for the most popular blog post I have ever written. In it I describe the reasons for the 2*RAM rule and why it doesn't apply nowadays. I also speculated about whether I would ever use more than 2G of swap, since then I have found cases where large amounts of swap are useful. The case for 2+G of swap is when you have lots of browser tabs open at once and not doing anything. For a desktop system I have found no other usage case where such large amounts of swap do any good. For a server I have NEVER found a case where large amounts of swap were ever any good, but I concede the fact that there are surely some daemons out there which allocate large amounts of RAM and do little with it. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/