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

Re: swap size



on Sat, Dec 02, 2000 at 12:01:44PM -0600, Dave Sherohman (esper@sherohman.org) wrote:
> On Fri, Dec 01, 2000 at 09:35:16PM -0500, patd@dahiroc.net wrote:
> > a couple of days ago a was configuring a bunch of boxes with 1G ram
> > and i allocated 1G of swap, because my boss said so.  a co-worker then
> > told me that the appropriate amount of swap to allocate should be
> > twice the ram.  i really don't see the point of having the swap to be
> > twice the size of ram, especially since i have 1G of it.  there must
> > be a point of diminishing return regarding swap allocation.  is there
> > even a point of allocating swap on a system with 1G ram if so what's
> > the magic size?
> 
> As others have said, you only need what you're going to use and the 2xRAM rule
> is largely obsolete these days.  As data points, I run two Linux workstations,
> both are configured as development stations using WindowMaker and primarly
> run Eterms, XMMS, gcc, and Netscape, plus a horde of dockapps.  The one at
> home is set up with 128M RAM + 128M swap; the one at work has 256M RAM and
> no swap.  Both work great and never have any memory shortages.

There's one advantage to a 2x or 3x rule, which is what I'd used in the
past.

First, in sizing your swap partitions, it probably makes more sense to
allocate more swap for systems on the lower end of the "currently
typical" memory allocation spectrum.  Which means that in another couple
of years, we might be advocating 2-3 GB of swap for a system with 1-2 GB
of physical memory, particularly if applications follow typical trends
toward bloat.  On the positive side, GNU/Linux, network-oriented
applications, web-enabled apps, handhelds, and related developments,
have made thin applications once again compelling.

The advantage:  it's easier to add memory (pop in a few sticks) than to
reassign and repartition disk.  If you start off a system with 2-3x
memory as swap, you'll have some proportional room to fill as you
ratchet up your memory over time.  I've gone from roughly three times
swap to 1.5 times as I've upped my system memory from 96 MB to 256 MB.
I've still got a healthy proportion, without having to repartition.

Agreement in general with others' comments:  swap is a buffer to extend
your system.  You don't need more than you need, but when you need it,
it's nice to have.

In tight situations, you can always add swapfiles as an emergency
measure, though these are less efficient than dedicated partitions.

-- 
Karsten M. Self <kmself@ix.netcom.com>     http://www.netcom.com/~kmself
 Evangelist, Zelerate, Inc.                      http://www.zelerate.org
  What part of "Gestalt" don't you understand?      There is no K5 cabal
   http://gestalt-system.sourceforge.net/        http://www.kuro5hin.org

Attachment: pgpWXg5UxHAuX.pgp
Description: PGP signature


Reply to: