pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: contrib/start-scripts/linux failing on RHEL 6 with ~9.3 because of missing oom_score_adj
Date: Sat, 25 Apr 2015 19:47:54 -0400
Message-ID: <13161.1430005674@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqQcCSBDAWO45hH0FWDcHi_HcxHmyMLukiMzaDcd0W06sA@mail.gmail.com>
References: <CAB7nPqQcCSBDAWO45hH0FWDcHi_HcxHmyMLukiMzaDcd0W06sA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Michael Paquier <michael.paquier@gmail.com> writes:
> Support for oom_score_adj has been added in kernel 2.6.36, a version
> newer than 2.6.32-71 which is embedded in RHEL6, so the startup script
> contrib/start-scripts/linux would fail because it does not check for
> the presence of oom_score_adj before adding the value of OOM_SCORE_ADJ
> to it.

I'm not sure where you draw the conclusion that RHEL6 doesn't have
oom_score_adj.  Mine certainly does:

[tgl@sss1 pgsql]$ uname -a
Linux sss1.sss.pgh.pa.us 2.6.32-504.16.2.el6.x86_64 #1 SMP Tue Mar 10 17:01:00 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

[tgl@sss1 pgsql]$ ls /proc/self/
attr/       coredump_filter  io         mountstats     pagemap      stack
autogroup   cpuset           limits     net/           personality  stat
auxv        cwd@             loginuid   ns/            root@        statm
cgroup      environ          maps       numa_maps      sched        status
clear_refs  exe@             mem        oom_adj        schedstat    syscall
cmdline     fd/              mountinfo  oom_score      sessionid    task/
comm        fdinfo/          mounts     oom_score_adj  smaps        wchan

I'm prepared to believe that the original upstream 2.6.32 didn't have
oom_score_adj, but Red Hat often back-ports kernel features.

> We could argue that this is not directly a problem of PG itself as one
> could just copy the startup script from the code tree to create its
> own service script and fix it, still I am getting the feeling that we
> should show a better logic with something like the patch attached.

This patch seems completely wrong, as it is forcing use of the oom
adjustment, whereas the intention is that the user should choose
if they want to use it; cf /contrib/start-scripts/linux lines 43-55.

Also, it kind of looks like you are working with something older
than what is in HEAD, anyway.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <13161.1430005674@sss.pgh.pa.us>
Permalink:  ../13161.1430005674@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13161.1430005674@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com
  Subject: Re: contrib/start-scripts/linux failing on RHEL 6 with ~9.3 because of missing oom_score_adj
  In-Reply-To: <13161.1430005674@sss.pgh.pa.us>
  References: <CAB7nPqQcCSBDAWO45hH0FWDcHi_HcxHmyMLukiMzaDcd0W06sA@mail.gmail.com> <13161.1430005674@sss.pgh.pa.us>

* 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