Re: Setting oom_adj on linux?

Greg Smith <greg@2ndquadrant.com>

From: Greg Smith <greg@2ndquadrant.com>
To: Magnus Hagander <magnus@hagander.net>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-01-04T16:17:19Z
Lists: pgsql-hackers
Magnus Hagander wrote:
> On Mon, Jan 4, 2010 at 16:45, Alvaro Herrera <alvherre@commandprompt.com> wrote:
>   
>> Magnus Hagander wrote:
>>     
>>> 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://archives.postgresql.org/message-id/20080201223336.GC24780%40alvh.no-ip.org
>>     
>
> Can't find a useful consensus though?
>   

In http://archives.postgresql.org/pgsql-hackers/2008-02/msg00049.php Tom 
points out that while you could make this adjustment in the init scripts 
for PostgreSQL, actually doing so is quite questionable as a packaging 
decision.  That's where that thread ended as far as I was concerned.  
The best I think anyone could do here is to add such a capability into 
some of the init scripts, but it would probably need to be disabled by 
default.  Since that sort of defeats the purpose of the change, I'm not 
sure what the benefit there is--if you have to turn it on, you might as 
well do something at a higher level instead.

-- 
Greg Smith    2ndQuadrant   Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com  www.2ndQuadrant.com