Re: configurability of OOM killer

Поиск
Список
Период
Сортировка
От Florian Weimer
Тема Re: configurability of OOM killer
Дата
Msg-id 82wspnf8rg.fsf@mid.bfk.de
обсуждение исходный текст
Ответ на Re: configurability of OOM killer  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: configurability of OOM killer  (Dimitri Fontaine <dfontaine@hi-media.com>)
Список pgsql-hackers
* Tom Lane:

>> IIRC, the idea is to get the machine out of OOM land with one killed
>> process, even if it causes dependent processes to fail.
>
> You're just parroting the reasoning given on the cited webpage, which
> is loony because it takes no account whatsoever of actual practice.

Oops, I hadn't actually read it (I can't reach the Web from this
terminal).

> Postgres is hardly the only daemon for which killing the parent results
> in far worse DOS than not doing so.  sendmail, sshd, inetd, and mysqld
> are examples that come to mind immediately, and I am fairly sure that
> it's true for apache as well.

Historically, the OOM killer was mainly there to avoid a total lock-up
or straight reboot on single-user machines with text-mode console and
the occassional broken shell script.  For example, it used to kill the
X server, too.  Anyway, a dead SSH session or database server is less
of a DoS than a lock-up due to the OOM killer's inability to recover
resources in a reasonable time frame.  (I'd need to check if it
prefers killing the main sshd daemon.  That would be rather
inconvenient.)

And let me repeat: If some shell script à la
 for x in *; do foo $x; done

is causing the trouble, you need to kill the parent (the shell) to
bring the system back.  Killing foo brings only very short-term
relief.

Fortunately, it's possible to turn off overcommitment nowadays, so
it's not such a huge issue anymore (for me, at least).  Some
applications are still not fully compatible with this mode (SBCL, for
instance, and the Sun JVM doesn't perform as well as it could,
either), but there are astonishingly few problems with
vm.overcommit_memory=2.

--
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: configurability of OOM killer
Следующее
От: David Fetter
Дата:
Сообщение: Re: Truncate Triggers