From: Greg Smith <greg@2ndQuadrant.com>
To: Venkat Balaji <venkat.balaji@verse.in>
Cc: pgsql-performance@postgresql.org
Subject: Re: : PG9.0 - Checkpoint tuning and pg_stat_bgwriter
Date: Tue, 04 Oct 2011 22:32:09 -0700
Message-ID: <4E8BEBD9.6070100@2ndQuadrant.com> (raw)
In-Reply-To: <CAFrxt0gZSCofPJSystj4ct+w5Dee6sek_3LmHF4Y34cYARzwJQ@mail.gmail.com>
References: <CAFrxt0iXn1vzF0wBzva+8CSdK34iqJ+mzcucxGpWqZ5s77LjXQ@mail.gmail.com>
<4E8B8960.9030903@2ndQuadrant.com>
<CAFrxt0gZSCofPJSystj4ct+w5Dee6sek_3LmHF4Y34cYARzwJQ@mail.gmail.com>
On 10/04/2011 07:50 PM, Venkat Balaji wrote:
> I was thinking to increase checkpoint_segments to around 16 or 20.
>
> I think 50 is a bit higher.
>
Don't be afraid to increase that a lot. You could set it to 1000 and
that would be probably turn out fine; checkpoints will still happen
every 5 minutes.
Checkpoints represent a lot of the I/O in a PostgreSQL database. The
main downside to making them less frequent is that recovery after a
crash will take longer; a secondary one is that WAL files in pg_xlog
will take up more space. Most places don't care much about either of
those things. The advantage to making them happen less often is that
you get less total writes. People need to be careful about going a long
*time* between checkpoints. But there's very few cases where you need
to worry about the segment count going too high before another one is
triggered.
--
Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: greg@2ndQuadrant.com, venkat.balaji@verse.in
Subject: Re: : PG9.0 - Checkpoint tuning and pg_stat_bgwriter
In-Reply-To: <4E8BEBD9.6070100@2ndQuadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox