Messages in this thread | ![/](/images/icornerl.gif) | | Date | Mon, 12 May 1997 13:32:15 +0200 () | From | Hugo Van den Berg <> | Subject | Re: Out of memory kernel deat |
| |
On Mon, 12 May 1997, Jon Tombs wrote:
-> My previous reply doesn't seem to have made it to the list. -> -> I proposed the following algorithm for oem situation. -> -> Igonoring process 1, give "death points" to each process, for the following -> attributes. -> -> X points for every page rss -> -Y points for every second of execution time -> Z points for not having uid=0 -> Z/2 points for not having euid=0
Why Z/2? Why not a configurable factor (i.e. have 4 weights instead of three)? -> The process with the biggest score gets killed. -> -> The important processes, tend to be: -> owned by root -> old (started at boot). Yes, but old doesn't mean a lot of execution time. For example my named, syslogd and klogd use very little CPU, they would be bait. The starttime of the process is IMHO a much better criterium.
-> There might me other factors to include, but they don't occur to me at the -> moment.
Try disk I/O. A lot of system processes only use disk I/O at startup, so little disk I/O might be a good indicator.
You could also think of a process being registered as vital through /proc in some way (by root only of course) and applying the criteria to all other processes. -> I think the above is a solution in the spirit of linux. If we use a fixed -> set of rules to kill a process, somebody will always be able to produce a -> situation that kills an important process. Let them change the weighting.
I agree.
-------------------------------------- Hugo Van den Berg - hbe@cypres.nl Phone - +31 (0)30 - 60 25 400 Fax - +31 (0)30 - 60 50 799 --------------------------------------
| ![\](/images/icornerr.gif) |