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

Re: swap space size

On Fri, Oct 22, 2004 at 12:03:42AM -0700, Paul Johnson wrote:
> "Gilbert, Joseph" <jgilbert@insuresuite.com> writes:
> > There is an issue that I do not fully understand that I have always kind of
> > taken for rote.  I was told back when I first started working with Unix that
> > the swap space needed to be at least twice the size of physical memory in
> > order to ensure a stable system.
> Well, that used to be the rule of thumb for a Linux-specific problem
> with swap space.  Today, you can run without swap without a problem.
> I keep a gig of swap on hand to avoid out of memory problems at all
> costs and have never hit that.
> A sane default today would be to set your swap size to at least the
> size of your current physical memory.  I suggest using a swap space
> equivilent to the maximum amount of memory your board can support,
> though this is generally considered massive overkill given how cheap
> RAM is these days.

Well, boards that can take 4G are common these days, but there's a
limit of 2G on swap size (at least up to 2.4; don't know offhand if
it's changed for 2.6). Beyond that you have to go to multiple swap

I tend to allocate the maximum 2G because disk space is so cheap these
days. I have used most of it on one occasion - running spice
simulations, looking at the plots, tweaking something and running it
again, repeat for ages, not realising that it was keeping all the old
data from previous plots in memory. Since the simulation itself is
pegged on CPU, it took me a long time to notice how slow it was getting :-)


Be kind to pigeons
Get my GPG key here: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x21C61F7F

Attachment: signature.asc
Description: Digital signature

Reply to: