* Matt Magoffin (postgresql.org@msqr.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