Chris Fearnley on Thu, 3 Jan 2002 00:10:18 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Swap Size


On Wed, Jan 02, 2002 at 04:43:16PM -0500, Bob Razler wrote:
> Hello:
> 
> 	What is the consensus on the size of the swap partition?  RAM? 
> 2xRAM?
> 
> 	I have 256 Megs of RAM.

It depends on what you want to happen when Netscape or another "bad"
application decides to eat all RAM + Swap.

If you want to hear your hard disk grind for awhile during low memory
situations, use a large swap partition.

If you want the kernel to start killing processes until it kills the
errant one, use a small swap file.  Usually, the kernel will find the
errant process on the first try and with no ill side effects (though
once in a while, you may need to restart some processes in
/etc/init.d).

Also, to be considered are applications that may legitimately need
lots of extra memory (bind, Oracle, etc.).  To support these
applications, you will be best to follow recommendations and go for
swap space = RAM (or even 2x RAM).

If your OS doesn't handle low memory situations well, you may need to
protect yourself by adding more swap.  In my opinion Linux's handling
of the low memory situation is correct:  the OS keeps going but a few
(possibly random, but usually not) processes get killed.

I personally don't like hard disk grinding and I know my apps don't
need extra RAM often.  So I tend to use 16MB or 32MB swap partitions
regardless of RAM.

-- 
Christopher J. Fearnley          |  Linux/Internet Consulting
cjf@netaxs.com                   |  Design Science Revolutionary
http://www.CJFearnley.com        |  Explorer in Universe
                  "Dare to be Naïve" -- Bucky Fuller

______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug