Re: Out of memory

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Alex Adriaanse <alex(at)innovacomputing(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Out of memory
Date: 2008-03-28 21:57:55
Message-ID: 20080328215755.GF9150@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Mar 28, 2008 at 01:38:57PM -0500, Alex Adriaanse wrote:
> First some background information:
>
> Software (at the time of the memory errors): CentOS 4.5 (x86_64) running
> its 2.6.9-55.ELsmp Linux kernel, PostgreSQL 8.1.9 (from RPMs provided on
> the PostgreSQL web site: postgresql-8.1.9-1PGDG.x86_64).
>
> Hardware: 4 dual-core Opterons. 16GB physical RAM, 2GB swap.

Since you've clearly disabled overcommit, you should realise that under
the default settings you will never use more than about 50-60% of your
memory for the database. Your swap will essentially always be unused.
The rest will be simply buffers/cache (which may be what you want). You
may want to play with the VM settings and/or increase the swap.

As for the precise cause of the crash: I don't see anything in the log
that would indicate anything unusual, though evidently it wanted about
256MB all of a sudden, which looks suspicously like your maintainence
workmem.

My guess is that the total allocated VM is fairly close to the limit of
your configuration and that a slightly higher than normal load and a
background autovacuum took it over the edge. My guess is that if you up
the swap to 4GB or perhaps 8GB, you'll get a lot more room to manouver.

Does Zenoss track to *allocated* VM in addition to total memory used?

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Benjamin Arai 2008-03-28 23:17:45 performance impact of using uuid over int4
Previous Message Sam Mason 2008-03-28 21:49:26 Re: Escaping \n