[Gllug] Linux - big not small

John Winters john at sinodun.org.uk
Thu Aug 4 18:28:26 UTC 2005


On Thu, 2005-08-04 at 16:39 +0100, Richard Jones wrote:
> On Thu, Aug 04, 2005 at 03:21:24PM +0100, John Southern wrote:
> > When memory was smaller say 32 or 64MB, the documentation always said swap 
> > should be twice the RAM.
> 
> The whole "swap must be twice as large as physical RAM" thing is based
> on an ancient version of Unix which required that all physical RAM was
> backed by swap first, before it could use further swap for actually
> swapping.  On this ancient system, it was a requirement to have swap
> >= RAM, and having swap = 2 * RAM would effectively double available
> memory.  This has never applied to Linux, although that hasn't stopped
> people from parroting the rule frequently ever since.

Not quite true.  There were apparently assumptions in the swap code in
Linux about Swap = 2 * RAM which made themselves felt in early versions
of the 2.6 kernel.  If that rule wasn't followed it could lead to
catastrophic failure of the system.  The explanation which I saw from
one of the core developers (Linus himself?) was that the assumption had
always been there, but had only manifested itself as a problem in the
re-worked code in 2.6.  The advice then was to have either no swap or
swap = 2 * RAM.

There was then a major re-re-work in 2.6 which did away with it
entirely.

John

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list