Re: [HACKERS] high shared buffer and swap

From: Laurent Laborde <kerdezixe(at)gmail(dot)com>
To: PFC <lists(at)peufeu(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: [HACKERS] high shared buffer and swap
Date: 2009-05-05 10:20:01
Message-ID: 8a1bfe660905050320t27dc2b5eo50e6277b4fdbcc12@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Tue, May 5, 2009 at 11:15 AM, PFC <lists(at)peufeu(dot)com> wrote:
>
>> 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 :
>
> Hm, do you really need swap with 32Gb of RAM ?
> One could argue "yes but swap is useful to avoid out of memory
> errors".
> But if a loaded server starts to swap a lot, it is as good as dead
> anyway...

Not really, but we have it.
I tried with swappinness set to 0 and ... it swaps !

I'm back to 4GB of shared_buffer :)
I'll try various setting, maybe 16GB, etc ...
But my goal was to avoid OS filesystem cache and usage of
shared_buffer instead : FAIL.

--
F4FQM
Kerunix Flan
Laurent Laborde

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Helmle 2009-05-05 10:39:23 bytea vs. pg_dump
Previous Message Magnus Hagander 2009-05-05 09:53:40 Re: "could not reattach to shared memory" captured in buildfarm

Browse pgsql-performance by date

  From Date Subject
Next Message Matthew Wakeling 2009-05-05 11:24:42 Re: [HACKERS] high shared buffer and swap
Previous Message PFC 2009-05-05 09:15:51 Re: [HACKERS] high shared buffer and swap