pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: David G Johnston <david.g.johnston@gmail.com>
To: pgsql-hackers@postgresql.org
Subject: Re: /proc/self/oom_adj is deprecated in newer Linux kernels
Date: Tue, 10 Jun 2014 10:13:39 -0700 (PDT)
Message-ID: <1402420419997-5806700.post@n5.nabble.com> (raw )
In-Reply-To: <CABwTF4W8YBEfgHm64CcZLvYHBj7yRYKM9ZcThW2aNsdDPeKixw@mail.gmail.com >
References: <15953.1316362868@sss.pgh.pa.us >
<1316420754.14001.3.camel@fsopti579.F-Secure.com >
<16241.1316441883@sss.pgh.pa.us >
<CABwTF4XDdYiBQXqj=CKrFXN7x2NiBbVnpHSJG6AVnMBLnLBmLA@mail.gmail.com >
<28946.1402408948@sss.pgh.pa.us >
<CA+Tgmoaps4ih-VEKvUgftqJ66_oSo-h9PpHi2_-wAzhVTYnzYw@mail.gmail.com >
<30117.1402411876@sss.pgh.pa.us >
<CA+TgmoZ2tDAVB5cLPt=UKHaogw+cfq6ZEis1yCTD_gsBWud9SA@mail.gmail.com >
<30601.1402413283@sss.pgh.pa.us >
<CABwTF4W8YBEfgHm64CcZLvYHBj7yRYKM9ZcThW2aNsdDPeKixw@mail.gmail.com >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Gurjeet Singh-4 wrote
> Even if the clueless DBA tries to set the oom_score_adj below that of
> Postmaster, Linux kernel prevents that from being done. I demonstrate
> that in the below screen share. I used GUC as well as plain command
> line to try and set a child's badness (oom_score_adj) to be lower than
> that of Postmaster's, and Linux disallows doing that, unless I use
> root's powers.
>
> So the argument that this GUC is a security concern, can be ignored.
> Root user (one with control of start script) still controls the lowest
> badness setting of all Postgres processes. If done at fork_process
> time, the child process simply inherits parent's badness setting.
The counter point here is that the postmaster can be set to "no kill" and
the >= condition allows for children to achieve the same while it is our
explicit intent that the children be strictly > parent.
To that end, should the adjustment value be provided as an offset to the
postmasters instead of an absolute value - and disallow <= zero offset
values in the process?
I get and generally agree with the environment variable proposal and it's
stated goal to restrict whom can makes changes. But how much less cost does
an environment variable have than a GUC if one GUC argument is still its
maintenance overhead?
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/proc-self-oom-adj-is-deprecated-in-newer-Linux-kernels-tp481...
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
view thread (66+ messages) latest in thread
Message-ID: <1402420419997-5806700.post@n5.nabble.com>
Permalink: ../1402420419997-5806700.post@n5.nabble.com/
Also on: postgresql.org/message-id/1402420419997-5806700.post@n5.nabble.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: david.g.johnston@gmail.com
Subject: Re: /proc/self/oom_adj is deprecated in newer Linux kernels
In-Reply-To: <1402420419997-5806700.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox