Messages in this thread | | | Subject | Re: Some questions about linux kernel. | Date | Mon, 13 Mar 2000 22:09:44 -0400 | From | Horst von Brand <> |
| |
Paul Jakma <paul.jakma@compaq.com> said: > On Sun, 12 Mar 2000, Horst von Brand wrote: > > How does the VM notice that it needs to reserve space or dole it out, when > > there are several root processes that need memory (named, the ftpd inetd is > > spawning, ...)?
> we trust root processes not to leak memory.. else we wouldn't run them > as root would we?
Who said "leak memory"? named(8) uses _huge_ amounts of memory quite legitimately, for one. Besides, "I run this as root, so I'm sure it doesn't leak" doesn't cut it for many cluebie sysadmins (nor for quite a few clueful ones, for that matter).
> > They'll eat up your root allowance,
> rather than an allowance, we should have a watermark. as soon as > physical free < watermark, we deny memory requests from processes euid > > 0. (we could perhaps just put euid > 0 processes that ask for RAM to > sleep, so that we can at least preserve their state till memory is > freed)
So? The non-root processes use up their allowance, the root processes eat up the rest. What's the difference?
[...]
> > the same as before. Besides, this isn't a solution anyway, you don't want > > to sit beside your server just in case it runs out of memory.
> well there is no perfect solution to OOM. But allowing root to telnet in > is IMO preferable to near-random killing.
How do you know it is root, and not Joe Random Luser who is logging in? How do you know root is aware of the problem, and is not just connecting in order to fix a configuration file with emacs?
There are no easy solutions, the best you can do is to choose the victim with some care -- but not too much, OOM is after all a extraordinary situation, sort of "cut off your leg and you might live, or die". You don't want to affect the normal running of the system for handling this far-out case. Just as you don't have marks on your legs indicating where to cut ;-) -- Horst von Brand vonbrand@sleipnir.valparaiso.cl Casilla 9G, Viña del Mar, Chile +56 32 672616
- 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/
| |