[ale] that same darn NFS problem SOLVED

Chris Ricker kaboom at gatech.edu
Mon Feb 17 16:20:05 EST 2003


On Mon, 17 Feb 2003, Calvin Harrigan wrote:

> At 02:38 PM 2/17/2003 -0500, Michael D. Hirsch wrote:
> >On Monday 17 February 2003 02:30 pm, Chris Ricker wrote:
> > > On Mon, 17 Feb 2003, James P. Kinney III wrote:
> > > > With a 2.4.x kernel and RAM <=4G swap=2xRAM
> > >
> > > That's not necessary. There was a bug in early 2.4.x that required
> > > swap=2xRAM for decent performance, but that's long since been fixed...
> > >
> > > You need enough swap to hold your working set. That could be anything
> > > from no swap to gigabytes, depending on what you do on that system....
> 
> <snip>
> 
> The 2xRam argument is understandable, but questionable/confusing (at least 
> in my opinion).  I have 128Megs Ram, a 256MB swap, fine.  I'm swapping too 
> much, I add another 256Megs of Ram, according to the argument I should now 
> increase my swap to 768MB (384MB ram total).  Why?
> Isn't the whole point of adding more memory to get away from swapping?
> Just a question I've asked several times without a good answer.

The 2x rule stems from the way virtual memory worked in earlier Unixes.
In, say, SunOS 4.x, the kernel required that all physical memory be backed
with swap space, and every time space was allocated in physical memory a
corresponding amount of space was first allocated in swap. The result was
that you *had* to have as much swap space as RAM. Period. A program wouldn't
run unless its memory requirements could be satisfied in both swap space and
physical memory (even if it never actually was going to be swapped out).

People usually instead had twice as much swap as RAM, so that they could run
more programs than would fit in physical memory (ie, what you'd think they
had swap space for in the first place ;-).

On modern systems and most Linux kernel revisions, VM is architectured
differently, that requirement is gone, and you're right. If you're
increasing the RAM w/o changing the load, there's no need to increase
swap.

later,
chris
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list