On Mon, 9 Mar 1998, Bradley, Greg wrote:

> On a Linux system it doesn't really matter so long as you have enough
> :-).

That's really true.  I have one system with 48M of ram and 48M of swap and
another system with 128M of ram and 20M of swap.  It's always best to have
a LITTLE bit of swap - a couple of megs at least - in case of emergency
more than anything else.  Linux is extremely tolerant of running out of
RAM and unlike many other OS's does not have any particular 'requirements'
about swap.  SCO as mentioned likes to save the entire contents of RAM to
swap, and a great many other Unices and Windows also behave this way.

Even on the 128M system, I still have 200K of swap used. The 48M system
often swaps 5-10M but rarely runs anywhere close to the swap limit.  Linux
reasons that programs that haven't run in hours or days probably belong in
the swapfile and puts them there even if it doesn't have anything better
than the disk cache to replace them with.

However, I also have an 8M system with only 16M of swap and (while it is
much more lightly loaded) it tends to use 8-10M of this swap.  Basically,
as your total installed RAM goes up, your need for swap does go down.

> shouldn't swap size be ram/2 rather than ram x 2?

There's no real 'formula' like this.  On Linux the simplest thing to do is
total up how much space you expect to need, and follow a formula more like

RAM + swap = expected-use + safety-factor

That's the formula I use. :)


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to