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

Re: swap size



On Sat, 2 Dec 2000 15:41:02 -0800
kmself@ix.netcom.com wrote:

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

1GB is lots of RAM. As you are talking about a bunch of boxes, what I
would try to do is to set up one box with a swap say twice this and
run the box as it is going to be used. The program free(1) can show
how much memory/swap is being used. I have no idea what these machines
will be used for, but my nose tells me that you are not using 1GB. Try
to observe this a reasonable amount of time.  If it never reaches
swap, say 500MB, you could do it perfectly without swap. If you come
close to use all, adding 1GB of swap should be more than plenty.

[...]

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

IMHO 1GB is not really a low-end system nowadays; I believe that
before upgrading memory of such a system, you'll be upgrading the
whole machine. On the other hand, Linux has no troubles with more than
one swap partition; you can even use swap files. The point here is,
that a system actually using so much RAM would not easily go by with
the lack of speed using constant swap. Again IMHO, I wouldn't worry
too much about upgrades; you need it working now.

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

You could even add a whole HD just for swap (if really needed).

--
Christoph Simon
ciccio@prestonet.com.br
---
^X^C
q
quit
:q
^C
end
x
exit
ZZ
^D
?
help
shit
.



Reply to: