On Sat, 2004-03-20 at 08:45, nate at refried.org wrote:
> On Fri, Mar 19, 2004 at 10:14:41PM -0600, Todd Young wrote:
> > I read somewhere that your swap space should be double your RAM up to 
> > 512MB, but I can't remember if that meant up to 512MB of RAM or 512MB of 
> > swap.
> 
> IIRC, that was for 2.4.x kernels prior to 2.4.10.  It's not the case
> anymore.

It used to be that less than 1-2x swap would behave badly, and it was
recommended to just not have swap at all if you didn't want to allocate
this much. No idea whats going on anymore.

But then up until recently, when running without swap, the OOM killer
would misbehave and start killing processes when there was no real
reason to do so. I was getting hit by this a lot myself. I'd barely be
using %50 of my 640mb of RAM and the OOM would kick in and it usually
seemed to prefer X as its victim. ;P Recent kernels fix this by not even
compiling in the OOM killer by default...

> The amount of swap depends on how much you're going to oversubscribe
> your system.  I typically use equal swap and RAM.  Although if you have
> more than a few GB of memory, you probably don't want to give up that
> much disk space to swap.

Personally for 128mb RAM and over I just use 256mb swap period. Haven't
had a problem, my systems rarely use any swap at all anyway. I had to
start using some amount of swap because of the OOM killer bug, but now
that thats been ripped out I suppose I could try going without again...

However a new consideration is suspend to disk. Been playing with it on
my laptop and its nifty. It even has uses for servers. Power gone out?
Only 5 minutes left on your UPS? Suspend to disk and preserve your
uptime... :)  Haven't seen any guidelines written but common sense says
you probably want equal swap to your RAM, but since it doesn't bother
saving the block cache and v2 supports compression you can actually get
away with less. My 144mb laptop with GNOME loaded only ends up saving a
40mb image...


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list