Apparently, though unproven, at 02:15 on Monday 17 January 2011, Mark Knecht did opine thusly:
[snip] > >> As Volker says, don't turn swap off. Make it small if you must, but > >> keep some around. It's just disk space. > > > > I thought swap was no longer necessary on a machine with sufficient > > memory. I guess I took I some bad advice a while back. > > I think the idea is never use swap if possible, but in a case where > you don't have swap space or run out of swap space I think it's still > possible to lose data. I no longer double memory in swap. In the old > days I did that. On this server I have 24GB or memory. It seems silly > to chew up 50GB of disk space for something that almost never gets > touched. If I see this machine swapping I turn something off, but I'm > the only user and here to watch what it's doing. The 2 x RAM rule is an ancient artifact that hasn't been true for, well for ages now. It came about because way back when you had to have swap to get anything done. The question is how much? The answer sucked out of someone's thumb was 2xRAM. This is a pretty useless generic value, but it was less useless than any other default. Picking swap amounts is like picking a wife - there's no sane default. A modern desktop that swaps is unusable - enormous amounts of data has to be pulled back in from the drive. A web server that swaps is already thrashing so you always want to avoid that. Besides, RAM is cheap and a server with 24G is common place. So is 4G on a notebook. So your viewpoint is completely correct. The kernel does need some swap though - it needs wiggle room for when you DO run out of RAM, and a little bit of swap gives that. It also staves off that bastard demon spawn progeny of satan called the dreaded oom killer.... -- alan dot mckinnon at gmail dot com

