Preventing OOM kills

From: Yang Zhang <yanghatespam(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Preventing OOM kills
Date: 2011-05-25 00:32:58
Message-ID: BANLkTikLz2YMS5GmUKQgMrYpFyHwZS687g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

PG tends to be picked on by the Linux OOM killer, so lately we've been
forcing the OOM killer to kill other processes first with this script:

while true; do
for i in `pgrep postgres`; do
echo -17 > /proc/$i/oom_adj
done
sleep 60
done

Is there a Better Way? Thanks in advance.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrej 2011-05-25 00:50:09 Re: Preventing OOM kills
Previous Message Tom Lane 2011-05-24 23:08:43 Re: Values larger than 1/3 of a buffer page cannot be indexed (hstore)