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

Re: need a daemon that kills off memory hogs



On Fri, Oct 19, 2001 at 06:37:18PM -0400, Avdi B. Grimm wrote:
> This is driving me nuts... every now and then, for one reason or
> another, some program(s) will gobble up all available memory (128MB RAM,
> 256MB Swap) and effectively freeze the computer.  It's not a single,
> isolateable program, it's usually caused by something different each
> time.  Sometimes it caused by starting a huge memory hog like NetBeans
> while there are several X sessions running.  This last time it was
> because I accidentally told Konqueror to open up a few dozen large JPEGs
> at once, and it cheerfully started a few dozen instances of the image
> viewer program.  My mistake, to be sure, but an easy one to make.
  	 	   ^^^^^^^^^^
Not your mistake, this (or any other user-land program) should not crash the
OS.

> 
> Now, I'm told the kernel (I'm running 2.4.8) has an out-of-memory
       	   	    	   		^^^^^
Upgrade.  Now.  Linus' kernels < 2.4.10 are really quite crap when it comes
to dealing with virtual memory; I've got a P3/450 128Mb machine here, and
while running X it would gradually just eat up all my swap, while leaving
fat gobs of memory free.  Get yourself 2.4.12, which is working prefectly
for me, or one of the '12-ac patches from
ftp.countrycode.kernel.org/pub/linux/kernel/people/alan/ (IIRC).

Plus, it fixes a local symlink DOS attack and a local root exploit.

> handler which kills off memory hogs when the system runs out of memory.
> However, either it's not enabled, or it's idea of "out-of-memory" is a
> little different from mine.  This last instance,  the computer was

The out of memory handler only kicks in when the kernel has exhausted all
physical memory and all swap.  Running KDE with 128MB RAM/256MB swap should
not take you to this point.  It's more of a last-ditch effort to keep your
precious uptime than something that you should be encountering on a daily
basis;) 

> Back in my Mandrake days, I recall their being a daemon that was set up
> as part of a standard install, which as far as I could tell, did the
> following:  sat in the background, and periodically requested various
> services from running daemons (like httpd).  If the daemons took too
> long to respnd, indicating the computer was overloaded, it would start
> killing off misbehaving processes.  Unfortunately,  I can't recall the
> name of that daemon.  
> 
> So, my question is, is there some package available for Debian that will
> do the same job as that unknown Mandrake daemon?   I'm getting sick and
> tired of having to hard-reset this thing every time it runs out of
> memory... reminds me too much of Win95.

Is this really what you want?  See if upgrading to 2.4.12 fixes this problem
(I'm pretty sure it will) first.  If not, then with RAM prices at an
all-time low, maybe you want to slap some more in?  Running a program that
goes around killing everyone else seems like an enormously hacky solution.

Also, I would imagine tha this would kill your VM system anyhow, since every
demon would regularily get woken up and swapped in to service a pointless
request, slowing down everything else on the system to no end.

-rob

Attachment: pgpUAtejXM4p0.pgp
Description: PGP signature


Reply to: