Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jan 2008 11:54:40 -0500
From:      Bill Moran <wmoran@potentialtech.com>
To:        Albert.Shih@obspm.fr
Cc:        Dan Nelson <dnelson@allantgroup.com>, freebsd-questions@freebsd.org
Subject:   Re: How manu swap ?
Message-ID:  <20080116115440.6510872c.wmoran@potentialtech.com>
In-Reply-To: <20080116163701.GV89314@pcjas.obspm.fr>
References:  <20080116150454.GP89314@pcjas.obspm.fr> <20080116162805.GH97708@dan.emsphone.com> <20080116163701.GV89314@pcjas.obspm.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
In response to Albert Shih <Albert.Shih@obspm.fr>:

>  Le 16/01/2008 =E0 10:28:06-0600, Dan Nelson a =E9crit
> > In the last episode (Jan 16), Albert Shih said:
> > > Hi all
> > >=20
> > > I known it's classic question.=20
> > >=20
> > > Long time ago when I install a FreeBSD x86 32 bits when I have N Go
> > > of Ram the installer take 2xN Go for the swap partition.
> > >=20
> > > Now I just install two machine with FreeBSD amd64 version with 8Go of
> > > Ram and FreeBSD installer take 4 Go of swap.
> > >=20
> > > Is a bug in the installer or now FreeBSD don't need 2xRam of swap ?
> >=20
> > When was the last time you saw your swap partition with more than 2GB
> > in use?  On an 8GB system, you probably will either never have enough
> > processes to require swapping at all, or you will have one or two
> > processes so big that if they ever swap, it's a sign you need more RAM,
> > not more swap :)  In systems with that much RAM, swap is pretty much
> > only used for crashdumps, and with minidumps enabled by default, you

This is really a pretty narrow view of things.

* Swap _can_ be used to extend a systems usability beyond what it was
  originally designed for.  If you don't exceed the physical RAM by too
  great a margin, allowing a few little-used processes to page out while
  heavy use processes use all available memory is not a big performance
  hit.
* The idea that an 8G system will never use all that RAM is laughable to
  me.  I can easily create applications that eat up 8G of RAM, legitimately.
* In the event that something unexpected happens, having a lot of swap can
  save your ass by causing the system to slow down instead of kill processe=
s.
* Disk space is cheap.  16G of swap costs what?  15G of 15,000 RPM SCSI
  hard drive space costs $40 -- not much for piece of mind.
* Of course, the crash dumps that are mentioned.

I agree, though, that swap isn't what it used to be.  Nobody uses it as
supplemental RAM any more as far as I can tell.  It's pretty much just a
safety net nowadays.

--=20
Bill Moran
http://www.potentialtech.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080116115440.6510872c.wmoran>