[PLUG] Swap or Not?

Derek Loree drl at drloree.com
Fri Jan 30 02:14:02 UTC 2004


On Thu, 2004-01-29 at 22:09, Evan Heidtmann wrote:
> On Thu, 2004-01-29 at 21:51, Paul Johnson wrote:
> >
> > > What I've seen happen when the system runs out of memory is that
> > > processes will be killed by the kernel, no warning, just gone.
> > 
> > Survival tactic, and not a bad one, really:  If something is eating
> > all the RAM, eventually it'll gun the offending process.
> 
> My experience has shown that it doesn't kill just the offending process,
> but everything.

That has not been my experience.  For example, in the course of
modifying a Live CD image, on a system with just enough ram to run the
live CD , I ran the Debian program "dselect" before activating a swap
file.  Needless to say, updating, selecting and then installing consumed
all of the RAM, and it needed more.  Gracefully enough, it died, leaving
all other processed still running.  After activating a swap partition,
the program was able to start and run successfully.

I've seen this type of behavior on several occasions, so maybe it has
something to do with what process the kernel decides to kill.  (Like
killing the X-server, instead of the 10 mozilla widows that are open.) 
Granted, these were not run-a-way processes, just the processes that put
the system over the edge.
> 
> I had gpilotd go filling up memory one day. Before I knew what was
> happening, it had filled up all my physical memory and the system froze
> solid swapping out. I waited for quite some time while it filled up the
> swap, all the while trying to get to a console to see what was going on.
> After about 10 minutes every process except init was killed: ssh was
> down, X down, everything killed.
> 
> It wouldn't be so bad if it killed just the process using up all the
> RAM, but losing every process on the system is not a happy situation.

I wonder if it is killing processes that you seem to no longer be
interested in running, instead of the process that is using most of the
CPU time.
> 
> Just thought I'd share.
> 
Thanks, every little bit helps us get closer to understanding the whole
thing.

Derek Loree





More information about the PLUG mailing list