Skip site navigation (1) Skip section navigation (2)

PostgreSQL oom_adj postmaster process to -17

From: Radovan Jablonovsky <radovan(dot)jablonovsky(at)replicon(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: PostgreSQL oom_adj postmaster process to -17
Date: 2012-07-24 19:18:41
Message-ID: CAJYcdTvw-Xk9oi0Hzb9w3wZYfB6LJ5KMCQW0uR7o0HdFATC4tQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
Hello,

We are running PostgreSQL version 9.1.1 with 32GB of RAM, 32GB of SWAP and
during high load we could reach (swap + RAM) memory limit. In this case
OOM-killer kills postgresql process(es). (Out of Memory: Killed process
12345 (postgres)). As admin I would like to exclude postgresql system
processes from being chosen by OOM-killer. Based on the PostgreSQL
documentation it could be done by properly setting vm.overcommit_memory=2,
vm.overcommit_ratio=(probably between 50 and 90) and set the
process-specific oom_adj value for the postmaster process to -17, thereby
guaranteeing it will not be targeted by the OOM killer. The PostgreSQL
should build with -DLINUX_OOM_ADJ=0 added to CPPFLAGS to have child
processes oom_adj equal to 0.

1) Will this setting means other system processes (logger process, writer
process, stats collector process, wal receiver process, etc..), which are
children of postmaster process, will be running with oom_adj set to 0 too?
2) Should the proper Postgresql compilation configuration be: ./configure
... CPPFLAGS="-DLINUX_OOM_ADJ=0" ...
3) Does somebody has experience with this solution for CentOS
kernel 2.6.18-308.el5 x86_64?

Sincerely,

*Radovan Jablonovsky*
**

Responses

pgsql-admin by date

Next:From: Jesper KroghDate: 2012-07-24 19:58:21
Subject: Tuning checkpoint_segments and checkpoint_timeout.
Previous:From: Joshua D. DrakeDate: 2012-07-24 17:41:41
Subject: Re: db size growing out of control when using clustered Jackrabbit

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group