Re: Setting oom_adj on linux? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Setting oom_adj on linux?
Date
Msg-id 16157.1262628583@sss.pgh.pa.us
Whole thread Raw
In response to Setting oom_adj on linux?  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Setting oom_adj on linux?  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Setting oom_adj on linux?  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> I realize this is a very platform-specific thing, but should we
> consider setting the value of /proc/<pid>/oom_adj when running on
> linux? See:
>
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/filesystems/proc.txt;h=220cc6376ef80e0c9bcfec162d45552e729cdf5a;hb=45d28b097280a78893ce25a5d0db41e6a2717853

One interesting thing I read there is:
   Swapped out tasks are killed first. Half of each child's memory size is   added to the parent's score if they do not
sharethe same memory.                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

This suggests that PG's shared memory ought not be counted in the
postmaster's OOM score, which would mean that the problem shouldn't be
quite as bad as we've believed.  I wonder if that is a recent change?
Or maybe it's supposed to be that way and is not implemented correctly?

BTW, the given link shows only chapter 1, see 


http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/filesystems/proc.txt;hb=45d28b097280a78893ce25a5d0db41e6a2717853

for the whole file.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_migrator issues
Next
From: Bruce Momjian
Date:
Subject: Re: pg_migrator issues