| From: | Gurjeet Singh <gurjeet(at)singh(dot)im> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | 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-06-10 15:58:01 |
| Message-ID: | CABwTF4WmOg_YjJs9igdeUkRcBmPeGAtX_uCxoYPHueczuK+Zbw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Jun 10, 2014 at 11:52 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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? But anyway, it's probably not worth the cost of double-forking to
> prevent it. I still say though that this is not a reason to make it as
> easy as change-a-GUC to break the intended behavior.
>
> Robert's idea of having the start script set an environment variable to
> control the OOM adjustment reset seems like it would satisfy my concern.
I'm fine with this solution. Should this be a constant 0, or be
configurable based on env. variable's value?
--
Gurjeet Singh http://gurjeet.singh.im/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephen Frost | 2014-06-10 15:58:42 | Re: why postgresql define NTUP_PER_BUCKET as 10, not other numbers smaller |
| Previous Message | Andres Freund | 2014-06-10 15:57:36 | Re: /proc/self/oom_adj is deprecated in newer Linux kernels |