Re: PG Killed by OOM Condition - Mailing list pgsql-hackers

From Bruno Wolff III
Subject Re: PG Killed by OOM Condition
Date
Msg-id 20051025042652.GA28772@wolff.to
Whole thread Raw
In response to Re: PG Killed by OOM Condition  (mark@mark.mielke.cc)
Responses Re: PG Killed by OOM Condition
List pgsql-hackers
On Mon, Oct 24, 2005 at 23:55:07 -0400, mark@mark.mielke.cc wrote:
> On Mon, Oct 24, 2005 at 10:20:39PM -0500, Bruno Wolff III wrote:
> > On Mon, Oct 03, 2005 at 23:03:06 +1000,
> >   John Hansen <john@geeknet.com.au> wrote:
> > > Good people,
> > > Just had a thought!
> > > Might it be worth while protecting the postmaster from an OOM Kill on
> > > Linux by setting /proc/{pid}/oom_adj to -17 ?
> > > (Described vaguely in mm/oom_kill.c)
> > Wouldn't it be better to use sysctl to tell the kernel not to over commit
> > memory in the first place?
> 
> Only if you don't have large processes in your system that fork()
> frequently, pushing the reserved memory over the limit, preventing
> PostgreSQL from allocating memory when it does need it, even though
> copy-on-write allows plenty of memory to continue to be available -
> it is just reserved... :-)
> 
> There isn't a perfect answer.

No, but I would think tying up some disk space as swap space would be a
better solution. The linux oom killer is really dangerous.


pgsql-hackers by date:

Previous
From: mark@mark.mielke.cc
Date:
Subject: Re: PG Killed by OOM Condition
Next
From: daveg
Date:
Subject: Re: PG Killed by OOM Condition