[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:

https://eprints.kfupm.edu.sa/75671/1/75671.pdf
http://sunsite.uakom.sk/sunworldonline/swol-01-1998/swol-01-insidesolaris.html

Rich.

-- 
Richard Jones
Red Hat
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list