Linux Swap Space

United States
January 9, 2007 8:15am CST
What is a good size partition for the swap space on a Linux computer? I know it should be some multiple of your ram but I can't remember what it should be. Any ideas?
5 responses
@rkaede (62)
• Singapore
12 Jan 07
I think usually they have double the size of your physical memory. for example if you have 256MB ram then make your swap for 512MB hope it solved your problem. :)
@stonehr (818)
• Croatia (Hrvatska)
12 Jan 07
Yes that's true this is old rule, double it from Ram. But if I had 2Gb of Ram I'll not make more than 256MB for swap or maybe 128 Mb will be enough.Anyway this swap will never be used so much.System will always use swap but only couple Mb's .
• United States
12 Jan 07
I would concure with the twice the size of your RAM.
@Asylum (47893)
• Manchester, England
10 Jan 07
It is often considered to be twice the RAM, but to be fair this is hardly necessary. After all, if you increase your RAM then you are less likely to use the swap partition as much. I would be inclined to simply allocate a couple of Gb, which should be more than adequate and a minor loss of space unless your computer is rather old. Naturally I would reduce the space for an older computer with a smaller drive. I have run several different distributions on my laptop, which has a 20 Gb hard drive and 256 Mb of RAM, and have always allocated 500 Mb.
• India
10 Jan 07
The multiple is just an approximation. I got 256 MB of RAM in my system and I set 600 as Swap. So set your swap to double of your current RAM and that should be fine for your system to work smoothly.
@stonehr (818)
• Croatia (Hrvatska)
11 Jan 07
My instalation of *NIX automaticly offer 1Gb upon instalation.I have 256 Mb Ram and never is used so much Swap.Till some time Servers on the internet used 2Gb for Swap memory. Today is maybe a litle bit more used.For Home purpose You don't need more than 1Gb.