Setting oom_adj on linux? - Mailing list pgsql-hackers

From Magnus Hagander
Subject Setting oom_adj on linux?
Date
Msg-id 9837222c1001040739l79fa0978ib1816a112798008e@mail.gmail.com
Whole thread Raw
Responses Re: Setting oom_adj on linux?  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Setting oom_adj on linux?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I realize this is a very platform-specific thing, but should we
consider setting the value of /proc/<pid>/oom_adj when running on
linux? See:


http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/filesystems/proc.txt;h=220cc6376ef80e0c9bcfec162d45552e729cdf5a;hb=45d28b097280a78893ce25a5d0db41e6a2717853

section 3.1.

To get the best benefit, I think it needs to be done in cooperation
between the startup scripts and PostgreSQL. We'd want -17 ("never oom
kill") on the postmaster, but some different value on regular backends
(since if it has to kill someone, it's better to pick a regular
backend so we can do a controlled restart). Only root can drop the
value, so the startup script needs to be part of it. But if we then
want to increase it for sub-processes, that'd require something in the
backend itself...

-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: New VACUUM FULL
Next
From: Alvaro Herrera
Date:
Subject: Re: patch - per-tablespace random_page_cost/seq_page_cost