Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WuPcI-0005YF-QO for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Jun 2014 17:13:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WuPcI-0002dm-Ao for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Jun 2014 17:13:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WuPcG-0002dN-Up for pgsql-hackers@postgresql.org; Tue, 10 Jun 2014 17:13:45 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1WuPcC-0001Bs-Cq for pgsql-hackers@postgresql.org; Tue, 10 Jun 2014 17:13:42 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1WuPcC-00031I-0E for pgsql-hackers@postgresql.org; Tue, 10 Jun 2014 10:13:40 -0700 Date: Tue, 10 Jun 2014 10:13:39 -0700 (PDT) From: David G Johnston To: pgsql-hackers@postgresql.org Message-ID: <1402420419997-5806700.post@n5.nabble.com> In-Reply-To: References: <15953.1316362868@sss.pgh.pa.us> <1316420754.14001.3.camel@fsopti579.F-Secure.com> <16241.1316441883@sss.pgh.pa.us> <28946.1402408948@sss.pgh.pa.us> <30117.1402411876@sss.pgh.pa.us> <30601.1402413283@sss.pgh.pa.us> Subject: Re: /proc/self/oom_adj is deprecated in newer Linux kernels MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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-tp4810971p5806700.html 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