RELENG_4 on flash disk and swap

Dmitry Pryanishnikov dmitry at atlantis.dp.ua
Sat Mar 11 01:15:51 UTC 2006


Hello!

On Fri, 10 Mar 2006, Kostik Belousov wrote:
>> the largest RSS - it could e.g. be a vital part of the routing software
>> (zebra/ripd/bgpd), and killing this process will render our router
>> unreachable and unusable!
>
> Then, what should kernel do ? It kills the process because it _needs_
> the page. Usually, this page is needed to fill the frame that was already
> allocated by some process, so, SIGKILL is another way to report ENOMEM.

  But AFAIK the kernel kills NOT the requesting process but the one with the
largest RSS. This selection algorithm seems to be the dumbest one, since
process with largest RSS almost always is the process which does some real 
work. Perhaps we should have possibility to choose between:

  1) no process kills at all, just keep waiting until free memory gets
     available as a result of some other process's activity;

  2) current algorithm;

  3) kill the "youngest" process (with lowest runtime).

> The only way to prevent this situation is to never satisfy
> memory address range requests that (potentially) cannot be backed
> by real memory (this includes swap) in the future.

  Compare "never satisfy request" and "kill another, totally unrelated, 
process".

Sincerely, Dmitry
-- 
Atlantis ISP, System Administrator
e-mail:  dmitry at atlantis.dp.ua
nic-hdl: LYNX-RIPE


More information about the freebsd-stable mailing list