[Gllug] performance difference between a swap partition vs a swap file.>>>>>

Richard Jones rich at annexia.org
Wed Dec 2 21:22:07 UTC 2009

On Wed, Dec 02, 2009 at 05:41:49PM +0000, Peter Corlett wrote:
> On 2 Dec 2009, at 10:46, Alain Williams wrote:
> > On Wed, Dec 02, 2009 at 10:39:23AM +0000, James Hawtin wrote:
> >> 33GB swap partition sounds insane, perhaps you have a very large  
> >> amount of
> > I still hear people saying ''I allocate as much swap as I have  
> > RAM''. I have never understood this rule of thumb, it *was* probably  
> > OK for the very first install of a new system of which you have no  
> > clue how much resources it is going to use because you have never  
> > seen it before.
> That rule of thumb probably dates back to SunOS times, which had a  
> fairly primitive VM subsystem that expected each page of RAM to be  
> backed by a page of swap.

I was waiting for someone to mention this ...

Yes, ancient SunOS had a primitive VM system which backed each
*anonymous* page of virtual memory with swap space.  (Things like
executable code and read-only data would be backed by their original
disk files.)

However anonymous pages are very common so that leads to the rule of
thumb that you needed swap = 1 x RAM just to break even.  If you
actually wanted to meaningfully swap, you needed > 1 x RAM.

This braindeadery was finally put to rest in Solaris in the early '90s:



Richard Jones
Red Hat
Gllug mailing list  -  Gllug at gllug.org.uk

More information about the GLLUG mailing list