From: | Greg Smith <greg(at)2ndQuadrant(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Recommended optimisations slows down PostgreSQL 8.4 |
Date: | 2011-08-12 01:17:02 |
Message-ID: | 4E447F0E.60208@2ndQuadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On 08/11/2011 07:35 PM, Waldo Nell wrote:
> Please explain why the system is slower with the recommended values for these two settings?
If the other parameters are at their defaults, the server is probably
executing a checkpoint every few seconds running your test. I'd wager
your log is filled with checkpoint warnings, about them executing too
frequently.
Each time a checkpoint happens, all of shared_buffers is dumped out. So
if you increase shared_buffers, but don't space the checkpoints out
more, it just ends up writing the same data over and over again. Using
a smaller shared_buffers lets the OS deal with that problem instead, so
it actually ends up being more efficient.
Basically, you can't increase shared_buffers usefully without also
increasing checkpoint_segments. All three of shared_buffers,
wal_buffers, and checkpoint_segments have to go up before you'll see the
expected benefit from raising any of them; you can't change a parameter
at a time and expect an improvement. Try this:
shared_buffers=512MB
wal_buffers=16MB
checkpoint_segments=64
And see how that does. If that finally beats your 50 minute record, you
can see if further increase to shared_buffers and checkpoint_segments
continue to help from there. Effective upper limits on your server are
probably around 2GB for shared_buffers and around 256 for
checkpoint_segments; they could be lower if your application uses a lot
of transitory data (gets read/written once, so the database cache is no
better than the OS one).
--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2011-08-12 02:17:14 | Re: Recommended optimisations slows down PostgreSQL 8.4 |
Previous Message | Waldo Nell | 2011-08-12 00:27:14 | Re: Recommended optimisations slows down PostgreSQL 8.4 |