RE: Overcommitable memory??

From: David Schwartz (davids@webmaster.com)
Date: Thu Mar 23 2000 - 17:54:49 EST


> >BTW, could you please point at a clean example of a program in actual use
> >that handles freeing up memory when OOM looms? Would be useful to have
> >handy...
>
> A description of one was just posted to this thread. On malloc()
> failure, it starts diverting new connections elsewhere and garbage
> collecting itself. Quite nice, although it should do so before
> malloc() starts failing...

        If there was a portable way to detect imminent resource exhaustion before
malloc starts to fail, I'd happily use it. On Linux, I don't even have
malloc failing. And on no platform do I have a good way to detect when I'm
starting to force the system to swap and it might help performance-wise if I
shrink my memory usage.

        What I tell our Linux customers to do is use resource limits to force
'malloc' to fail. That requires some manual tuning, you have to think about
how much RAM you have, how much the kernel will be using for network stuff,
and how much other applications will be using. It's better than forcing the
system to a crawl though.

        DS

        PS: The issue of helping applications detect resource issues and respond to
them is completely orthogonal to the issue of overcommittment. If a system
has 90Gb of swap, I still want to know that I'm forcing the system to use
it, because performance is going to start going down the toilet.

-
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/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:39 EST