Re: /proc/self/oom_adj is deprecated in newer Linux kernels

From: Christoph Berg <cb(at)df7cb(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Gurjeet Singh <gurjeet(at)singh(dot)im>, Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: /proc/self/oom_adj is deprecated in newer Linux kernels
Date: 2014-07-02 09:17:40
Message-ID: 20140702091739.GC3645@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Re: Tom Lane 2014-07-01 <20654(dot)1404247905(at)sss(dot)pgh(dot)pa(dot)us>
> Yeah, I'm unexcited about this proposal. In any case, given the two
> existing APIs we have to deal with, allowing PG_OOM_ADJUST_VALUE to
> default to "0" is sane in both APIs but a default for the file name
> can work for only one.

Nod.

> Fair enough. I went for a minimum-change approach when hacking that
> script, but we could change it some more in the name of readability.
> Will do something about that.

Thanks, it's much nicer now. There's one uglyness left though: The
name PG_CHILD_OOM_SCORE_ADJ should match what actually gets passed to
the backends,

DAEMON_ENV="PG_OOM_ADJUST_FILE=$PG_OOM_ADJUST_FILE PG_OOM_ADJUST_VALUE=$PG_CHILD_OOM_SCORE_ADJ"

would better be PG_OOM_ADJUST_VALUE=$PG_OOM_ADJUST_VALUE.

(Possibly the smart way to fix this would be to change
src/backend/postmaster/fork_process.c to use PG_CHILD_OOM_SCORE_ADJ
instead.)

Christoph
--
cb(at)df7cb(dot)de | http://www.df7cb.de/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2014-07-02 09:19:25 Re: pgaudit - an auditing extension for PostgreSQL
Previous Message Etsuro Fujita 2014-07-02 09:15:58 Re: 9.5 CF1