Re: Setting oom_adj on linux? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Setting oom_adj on linux?
Date
Msg-id 5140.1262960873@sss.pgh.pa.us
Whole thread Raw
In response to Re: Setting oom_adj on linux?  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Setting oom_adj on linux?  (Alex Hunsaker <badalex@gmail.com>)
Re: Setting oom_adj on linux?  (Stephen Frost <sfrost@snowman.net>)
Re: Setting oom_adj on linux?  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> Do we need to make the value configurable? I'd certainly find it
> interesting to set backends to say 5 or something like that, that
> makes them less likely to be killed than any old "oops opened too big
> file in an editor"-process, but still possible to kill if the system
> is *really* running out of memory.

I don't want to go to the trouble of creating (and documenting) a
configure option for this.  Much less a GUC ;-)

What I suggest is that we do something like
#ifdef LINUX_OOM_ADJ...fprintf(oom, "%d\n", LINUX_OOM_ADJ);...#endif

Then, somebody who wants the feature would build with, say,-DLINUX_OOM_ADJ=0
or another value if they want that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: RFC: PostgreSQL Add-On Network
Next
From: Stefan Kaltenbrunner
Date:
Subject: Re: [COMMITTERS] pgsql: Also update ChangerLog file.