Re: Setting oom_adj on linux?

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Setting oom_adj on linux?
Date: 2010-01-04 16:59:00
Message-ID: 9837222c1001040859r5f0d8f5cv5f22ac85790a1c52@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 4, 2010 at 17:55, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> Magnus Hagander wrote:
>
>> Right. Which is why I like the idea of disabling the OOM killer for
>> the *postmaster*, but not the regular backends. Gives it a chance to
>> recover. It's not nice, but it's better than nothing.
>
> It doesn't sound like the init script can reenable the killer for the
> child processes though.  So, if there's anything that the core code
> ought to do, is re-enable OOM-killer for postmaster children, after
> being disabled by the initscript.

Yeah, that's why the backend code would need to be involved.

> BTW, is it possible for pg_ctl to disable OOM-killer?  I guess not,
> since it's not run by root ...

No, it has to run as root.

> Is there a way to disable memory overcommit for particular processes?
> That would be very useful -- just disable overcommit for all Postgres
> processes, and there shouldn't be much need to enable the killer for
> backends.

Not that I've been able to find.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-04 16:59:46 Re: Setting oom_adj on linux?
Previous Message Simon Riggs 2010-01-04 16:57:32 Re: New VACUUM FULL