Re: [PERFORM] high shared buffer and swap - Mailing list pgsql-hackers

From Scott Marlowe
Subject Re: [PERFORM] high shared buffer and swap
Date
Msg-id dcc563d10905040807h6a88dd51o2683ed6105454ac0@mail.gmail.com
Whole thread Raw
In response to high shared buffer and swap  (Laurent Laborde <kerdezixe@gmail.com>)
List pgsql-hackers
On Mon, May 4, 2009 at 2:10 AM, Laurent Laborde <kerdezixe@gmail.com> wrote:
> Friendly greetings !
> I found something "odd" (something that i can't explain) this weekend.
>
> An octocore server with 32GB of ram, running postgresql 8.3.6
> Running only postgresql, slony-I and pgbouncer.
>
> Just for testing purpose, i tried a setting with 26GB of shared_buffer.
>
> I quickly noticed that the performances wasn't very good and the
> server started to swap slowly but surely.
>  (but still up to 2000query/second as reported by pgfouine)
>
> It used all the 2GB of swap.
> I removed the server from production, added 10GB of swap and left it
> for the weekend with only slony and postgresql up to keep it in sync
> with the master database.
>
> This morning i found that the whole 12GB of swap were used :
> Mem:  32892008k total, 32714728k used,   177280k free,    70872k buffers
> Swap: 12582896k total, 12531812k used,    51084k free, 27047696k cached

Try setting swappiness =0.

But as someone else mentioned, I've alwas had better luck letting the
OS do most of the caching anyway.

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: hellow Postmaster and Postgres
Next
From: Andres Freund
Date:
Subject: Re: conditional dropping of columns/constraints