How manu swap ?
Bill Moran
wmoran at potentialtech.com
Wed Jan 16 08:54:42 PST 2008
In response to Albert Shih <Albert.Shih at obspm.fr>:
> Le 16/01/2008 à 10:28:06-0600, Dan Nelson a écrit
> > In the last episode (Jan 16), Albert Shih said:
> > > Hi all
> > >
> > > I known it's classic question.
> > >
> > > 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.
> > >
> > > Now I just install two machine with FreeBSD amd64 version with 8Go of
> > > Ram and FreeBSD installer take 4 Go of swap.
> > >
> > > Is a bug in the installer or now FreeBSD don't need 2xRam of swap ?
> >
> > 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 processes.
* 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.
--
Bill Moran
http://www.potentialtech.com
More information about the freebsd-questions
mailing list