Re: configurability of OOM killer - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: configurability of OOM killer
Date
Msg-id 47A3BB26.2030602@dunslane.net
Whole thread Raw
In response to Re: configurability of OOM killer  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>   
>> This page
>> http://linux-mm.org/OOM_Killer
>>     
>
> Egad.  Whoever thought *this* was a good idea should be taken out
> and shot:
>
>     The independent memory size of any child (except a kernel thread) is added to the score:
>
>         /*
>          * Processes which fork a lot of child processes are likely
>          * a good choice. We add the vmsize of the childs if they
>          * have an own mm. This prevents forking servers to flood the
>          * machine with an endless amount of childs
>          */
>
> In other words, server daemons are preferentially killed, and the parent
> will *always* get zapped in place of its child (since the child cannot
> have a higher score).  No wonder we have to turn off OOM kill.
>
>   

That was pretty much my reaction.

And it looks like you can't turn it off for postgres processes because 
that works by process group and we call setsid(), so we aren't in a 
single process group.

cheers

andrew


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: configurability of OOM killer
Next
From: "Gurjeet Singh"
Date:
Subject: Re: and waiting