Re: Out of memory kernel death

Ian Main (slow@intergate.bc.ca)
Wed, 7 May 1997 22:30:38 -0700 (PDT)


On Thu, 8 May 1997, Bryn Paul Arnold Jones wrote:

> On Wed, 7 May 1997, bert hubert wrote:
>
> >
> > On Wed, 7 May 1997, Theodore Y. Ts'o wrote:
> >
> > > looks through the processes and kills off the largest one.
> > > This should be doable in Linux too...
> > >
> > > The problem is that the largest process is often the X server. Often
> > > this will indeed free a lot of memory, but it's not necessarily the best
> > > thing to do...
> >
> > This is getting uglier & uglier, but let's be pragmatic and make it kill
> > the largest process NOT called "X".
> >
> > bert hubert.
> >
> Hmm, that's not always best either (and that's policy in the kernel,
> someone could find out, and start calling all there processes "X" ;).
>
> A better thing to do would be to kill off the latest started process
> consuming more that x% of the memory. Ie if you start X, and netscape,
> and get X with 50%, and netscape with 30%, and x% is 25 then netscape will
> be killed (if set at x% was 30+, it would be X again)

Is this a kernel thing though? Wouldn't a user space daemon do this job
just fine.. only thing I could see is if the system were doing heavy
swapping (which I suppose is often a problem with runaway ram eating
processes.)

heh.. something that creates and swapon's swap files, kills overly huge
processes and is very configurable could be useful for some people..
wouldn't be hard to make either.

Ian