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

From Martijn van Oosterhout
Subject Re: PG Killed by OOM Condition
Date
Msg-id 20051004094547.GA17589@svana.org
Whole thread Raw
In response to Re: PG Killed by OOM Condition  (Jeff Davis <jdavis-pgsql@empires.org>)
List pgsql-hackers
On Mon, Oct 03, 2005 at 11:47:57PM -0700, Jeff Davis wrote:
> I think that I've run into the OOM killer without a fork() being
> involved, but I could be wrong. Is it possible to be hit by the OOM
> killer if no applications use fork()?

fork() is the obvious overcomitter. If Netscape wants to spawn a new
process, it first has to fork 50MB of memory, then free probably most
of it because it execs some little plugin. If processes mmap() a large block
and then doesn't use it until later. Similar idea with brk(). If you
run out of swap at the wrong moment... Recent versions are more clever
about who to kill. Sometimes you just get unlucky...

It's always killed the right process for me (Mozilla derivative leaked
masses of memory over long period).
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Tuning current tuplesort external sort code for 8.2
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Tuning current tuplesort external sort code for 8.2