2002-01-23 12:58:05

by Andrey Nekrasov

[permalink] [raw]
Subject: OOM killer.

Help.

Is it possible to disable VM-killer completely?

Or make it not kill some critical tools. I want, for example, that
in any situation sshd/nfsd/cron remained alive.

--
bye.
Andrey Nekrasov, SpyLOG.


2002-01-23 13:56:27

by Helge Hafting

[permalink] [raw]
Subject: Re: OOM killer.

Andrey Nekrasov wrote:
>
> Help.
>
> Is it possible to disable VM-killer completely?
Obviously not - it triggers only when there isn't
enough memory to continue. The alternative to a
OOM killer routine is either a kernel that locks up
effectively killing everything, or a kernel that
allocates all memory early requiring a _lot_ more
memory to run at all. (If you had that memory
you wouldn't run out in the first place.)
>
> Or make it not kill some critical tools. I want, for example, that
> in any situation sshd/nfsd/cron remained alive.

The trivial fix is to start sshd/nfsd/cron from /etc/inittab,
similiar to how getty usually starts. They may still get
killed, but init will restart them asap.

Adding a lot of swap is also a good idea - the machine will
merely slow down instead of killing something.

Helge Hafting