Re: Kernel call chain search tool?

Dan Kegel (dank@kegel.com)
Thu, 26 Sep 2002 09:17:32 -0700


Alan Cox wrote:
>
> On Wed, 2002-09-25 at 05:36, Dan Kegel wrote:
> > <prelude>
> > I have a large multithreaded program that has a habit of using too
> > much memory, and as a safeguard, I want to kill it before it makes
> > the system unstable. The OOM killer often guesses wrong, and RLIMIT_AS
> > kills too soon because of the address space used up by the many thread
> > stacks.
> > So I'd like an RLIMIT_RSS that just kills the fat process.
>
> The RSS limit isnt a "kill" limit in Unix. its a residency limit. Its
> preventing the obese process from getting more than a certain amount of
> RAM as opposed to swap

Yeah. RLIMIT_RSS seemed like something I could hijack for the
purpose, though. And the code change was really small
( http://marc.theaimsgroup.com/?l=linux-kernel&m=103299570928378 ).

If only the darn program didn't have so many threads, RLIMIT_AS
or the no-overcommit patch would be perfect. I unfortunately can't
get rid of the threads, so I'm stuck trying to figure out some way
to kill the right program when the system gets low on memory.

Maybe I should look at giving the OOM killer hints?
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/