On Mon, Jun 28, 2004 at 03:18:16AM -0400, Ricky Beam wrote:
Swap should be 2x physical ram. But one can get away with less.
There was a reasonably long discussion on lkml some time ago regarding this. The 2xRAM rule of thumb was useful with older machines, but should not be taken too seriously nowadays; I'd recommend between 256 and 512 MB of swap, no more (except as an emergency solution).
There have been may jehads in the name of swap... There are numerous reasons to make swap 2x ram, at minimum, 1x ram. At the top of the list is the strong recommendation from those far more knowledgable of the linux memory management than ALL of us. Linux doesn't manage memory the way sane people do... "is this memory free" has a minimum of three answers. (in 2.6, it's now four answers.)
By the time a machine with 1 GB of RAM actually uses around 1 GB of swap, it will be about as responsive as the nearest brick wall, so you might as well not bother, like the previous poster said.