Re: Out of memory on SELECT in 8.3.5

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Matt Magoffin <postgresql(dot)org(at)msqr(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Out of memory on SELECT in 8.3.5
Date: 2009-02-09 20:33:31
Message-ID: 20090209203331.GG8123@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* Matt Magoffin (postgresql(dot)org(at)msqr(dot)us) wrote:
> Thanks for the advice. Should we have more than 2GB of swap available? I
> thought the goal for a Postgres system was to avoid swap use at all cost?
> Would it be better for us to add more swap, or adjust this
> overcommit_ratio as you discuss?

You do want to avoid swap, but at the same time you don't want to end up
with lots of real memory unavailable for use (as here..). After
thinking about this for a bit, my suggestion would be to add swap up to
the amount of memory you have, for starters. That would give you 24G of
commitable memory. I would then pay attention to free, swap usage, and
/proc/meminfo. If you start using alot of swap, you might want to
adjust PG to use less memory; if you see alot of free memory but you're
close to your commit limit, up the ratio some.

Basically, the swap would be there just in case all those folks with
outstanding committed memory decide to actually use it. That's not all
*that* likely to happen, in the end.

Thanks,

Stephen

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-02-09 20:34:34 Re: Out of memory on SELECT in 8.3.5
Previous Message Matt Magoffin 2009-02-09 20:32:41 Re: Out of memory on SELECT in 8.3.5