avoiding a problem that postmaster is suddenly killed by OOM-Killer

From: Toru SHIMOGAKI <shimogaki(dot)toru(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-docs(at)postgresql(dot)org
Subject: avoiding a problem that postmaster is suddenly killed by OOM-Killer
Date: 2007-03-02 12:00:11
Message-ID: 45E811CB.8040300@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Hello all,

To avoid a problem that postmaster is suddenly killed by OOM-Killer, some
techniques are described in "16.4.3. Linux Memory Overcommit"
http://www.postgresql.org/docs/8.2/interactive/kernel-resources.html#AEN19362

One way to avoid this problem is to run PostgreSQL on a machine where you can
be sure that other processes will not run the machine out of memory.

On Linux 2.6 and later, a better solution is to modify the kernel's behavior
so that it will not "overcommit" memory. This is done by selecting strict
overcommit mode via sysctl:

This description may be misread, at least to me, because OOM-Killer's behavor
has nothing to do with overcommit mode. It is true that turning overcommit off
is one of the solutions but it is not enough: OOM-Killer is invoked whenever
physical memory is exhausted not only by user application but also by in-kernel
working. I checked it with some kernel hackers on Linux-2.6.9-42 (RHEL4 Update4).

I think that to avoid this problem, "increasing swap area" should be added on
this manual. Increasing both physical memory and swap area is easy to
understand, but increasing physical memory is not software solution.

Best regards,

--
Toru SHIMOGAKI<shimogaki(dot)toru(at)oss(dot)ntt(dot)co(dot)jp>

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2007-03-02 23:34:33 Re: broken doc
Previous Message Tatsuo Ishii 2007-03-02 06:06:39 Re: broken doc