Re: [2.4.18] Security: Process-Killer if machine get's out of memory

Andreas Hartmann (andihartmann@freenet.de)
Sun, 24 Mar 2002 18:24:12 +0100


Alan Cox wrote:
>>I've got a basic question:
>>Would it be possible to kill only the process which consumes the most
>>memory in the last delta t?
>>Or does somebody have a better idea?
>
>
> At the point you hit OOM every possible heuristic is simply handwaving that
> will work for a subset of the user base. Fix the real problem and it goes
> away.

This would and must be the first solution. I agree with you.

On the other hand - nobody is perfect and there can be such situations.
Why shouldn't the kernel be the ultimate checkpoint to prevent greater
damage? That's what I'm thinking.

It's not easy and it takes probably ressources (processor and RAM) to do
some
checks. The idea would be, to do such checks only when the memory-usage is
over a defined value, e.g. 60% or later. Best would be, if it would be
free configurable (to have the checks at all and at which point beginning).

I suggested a heuristic. Maybe, there are better ones. What I want to
say is, that I think that there should be a mechanism to detect and kill
a process as good as possible, which wants to have all the memory and
even more - before the memory is used to 100%.

Regards,
Andreas Hartmann

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