lkml.org 
[lkml]   [1999]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Memory hogs
Rik van Riel wrote:
> Please don't. My little algorithm (with no overhead on a normal
> system) works great -- it has been tested by simulation folks
> who want a 16MB netscape killed in favor of their week-old,
> 150MB simulation.

Ok, I'll adapt your patch. The only gripe I have is that it doesn't send
out warning shoots before, that allow tasks to quit nicely. As I said, even
the X server can be the cause of a OOM condition, and if the algorithm works
fine, it is rightly shot. Even though a lot of other processes might go down
before (most of them are likely to die after X is shot, either). But I
think another out of memory check (with lower limits, and SIGQUIT instead of
SIGKILL) can solve that.

Choosing a good algorithm is important, since I can well remember us
bastard students from hell kicking out other's week-long running simulations with
a clever written memory hog program (on HP workstations: HP-UX doesn't
overcommit and kicks out last allocater. The hog allocated all available pages
(with raw sbrk()) and then you just have to wait until the long-running job
needs a new page - and your workstation was unloaded ;-).

My algorithm was more intented to work against real memory hoggers (DOS
attacks from the BSfHs, processes going wild), not against creeping memory
consumption, such as with large simulations growing larger and larger, and
finally kicking themselves out of memory (or - as you propose - kicking out
other's apps). If memory shortage is a normal operation condition, you really
should enlarge your swap-file.

--
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://www.jwdt.com/~paysan/

Sent through Global Message Exchange - http://www.gmx.net

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.057 / U:2.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site