Re: Big trouble with memory !! - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Big trouble with memory !!
Date
Msg-id 20050406221507.GF14589@svana.org
Whole thread Raw
In response to Re: Big trouble with memory !!  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Big trouble with memory !!  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Wed, Apr 06, 2005 at 04:37:59PM -0400, Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
> > What I don't understand is the problem with overcommitting.
>
> The problem with Linux overcommit is that when the kernel does run out
> of memory, the process it chooses to kill isn't necessarily one that was
> using an unreasonable amount of memory.  The earlier versions were quite
> willing to kill "init" ;-) ... I think they hacked it to prevent that
> disaster, but it's still entirely capable of deciding to take out the
> (real) postmaster, your mail daemon, or other processes you'd prefer not
> to lose.  As such, the feature is really too dangerous to enable on
> machines being used for production purposes.

Ok, I think the point I'm trying to make is that with "strict
autocommit" in its current state isn't really that strict and just
causes the problem to happen elsewhere. The guy had heaps of memory
available and the system is dying on him. Better turn autocommit off
and let him use up the 2GB of swap before having processes killed.

Or rather, if you can't stop the killer anyway, take advantage of the
extra memory.

That formula they use is bizarre. I tend to allocate max 250MB swap
even on machines with a gig of memory. If I'm using a lot of swap I'm
doing something wrong. By the formula they use strict autocommit would
start failing memory allocations with my memory only half used...
--
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.

Attachment

pgsql-general by date:

Previous
From: David Gagnon
Date:
Subject: COPY command use UTF-8 encoding and NOT UNICODE(16bits)... please confirm. Should postgresql add :set CLIENT_ENCODING to 'UTF-8'; to avoid confusion
Next
From: Tom Lane
Date:
Subject: Re: monitoring database activity on solaris