On Wed, 4 Mar 1998, Rick Forrester wrote:

> > shouldn't swap size be ram/2 rather than ram x 2? like if you already 
> > have a large amnt. of ram,  then the chances of swap being used would 
> > be slimmer, so why is there a need for 2x swap ? 
> 
> Both postitions are probably wide of the mark.  The old school idea for many 
> previous implementations of unix was 2x(amount of RAM) as a basic.  Supported 
> swapping of current processes/users as I recall.
> 
> What has served me well on the Linux systems I've set up in the last 
> couple-odd years has been to go with a "total memory" goal of about 96Mb for 
> small memory (< 64Mb RAM) systems.  In this model it's <physical RAM> + <swap 
> space> = 96M.
> 
> For larger systems, swap space = RAM isn't a bad starting point.  It can be 
> juggled up or down, based on experience & need.  If you run large, memory 
> intensive software, like image processing, even that may not be enough to keep 
> you out of trouble.  With 128M RAM I still dip into swap space at least part 
> of the time. 8^)

Sizing swap space can involve you in 'religious' arguments, in which I
do not want to become embroiled.

That said, sizing swap depends tremendously on the use to which a
Linux/Unix machine is put.

For a workstation (ie a machine that is not running many daemons and
is a single user machine, probably running X and X Applications), 32MB
RAM and 32MB swap is probably fine. If however the user has multiple
Netscapes, is running CDE and Applix then this is just not enough -
32MB RAM and 64MB swap is probably safer.

For a server, it depends on what the server is doing...and you need
some experience to size things properly.

Against this however, the cost of disk space is now so small, that
oversizing swap is not going to cost you hundreds of dollars. Giving
your machine 127MB swap (the max single swap file size) when you have
a multi-gigabyte disk is a sensible way to go in terms of 'future
insurance'. Putting this in a different disk to the /usr file system
is also a good idea in terms of speed (but if you are using IDE, it
doesn't really matter).

For a server, you do still have to think about the positioning and
sizing of swap space(s) as poorly sized and positioned swap spaces can
cause you performance problems. Don't forget you can prioritise
multiple swap spaces (see 'man 2 swapon' for details of this).


Robert Hart                                             [EMAIL PROTECTED]
Red Hat Software Inc.           Phone: +1-919-547-0012  Fax: +1-919-547-0024
4201 Research Commons Suite 100, 79 TW Alexander Dr., Research Triangle Park,
                        NC 27709, USA


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