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

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gurjeet Singh <gurjeet(at)singh(dot)im>, 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-06-10 15:57:36
Message-ID: 20140610155736.GP8406@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-06-10 11:52:17 -0400, Tom Lane wrote:
> andres(at)anarazel(dot)de (Andres Freund) writes:
> > On 2014-06-10 11:20:28 -0400, Tom Lane wrote:
> >> Maybe I'm mistaken, but I thought once the fork_process code has reset our
> >> process's setting to zero it's not possible to lower it again (without
> >> privileges we'd not have).
>
> > No, doesn't look that way. It's possible to reset it to the value set at
> > process start. So unless we introduce double forks for every backend
> > start it can be reset by ordinary processes.
>
> That's kind of annoying --- I wonder why they went to the trouble of doing
> that?

My guess is that they want to allow a process to only temporarily reduce
the likelihood of getting killed while it's doing something
important.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2014-06-10 15:58:01 Re: /proc/self/oom_adj is deprecated in newer Linux kernels
Previous Message Tom Lane 2014-06-10 15:56:14 Re: /proc/self/oom_adj is deprecated in newer Linux kernels