Re: : PG9.0 - Checkpoint tuning and pg_stat_bgwriter

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: : PG9.0 - Checkpoint tuning and pg_stat_bgwriter
Date: 2011-10-04 22:47:10
Message-ID: CAOR=d=3GHG_jK=N7v0Ea2DuM2qLkdnbJsnktXCZ6t6JG1Tu35g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Oct 4, 2011 at 4:32 PM, Greg Smith <greg(at)2ndquadrant(dot)com> wrote:
> On 10/04/2011 03:50 AM, Venkat Balaji wrote:
>>
>> I had a look at the pg_stat_bgwriter as well.
>
> Try saving it like this instead:
>
> select now(),* from pg_stat_bgwriter;
>
> And collect two data points, space a day or more apart.  That gives a lot
> more information about the rate at which things are actually happening.  The
> long-term totals are less interesting than that.
>
> Generally the first round of tuning work here is to increase
> checkpoint_segments until most checkpoints appear in checkpoints_timed
> rather than checkpoints_req.  After that, increasing checkpoint_timeout
> might also be useful.

That last paragraph should be printed out and posted on every pgsql
admin's cubicle wall.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2011-10-04 23:33:23 Re: Query with order by and limit is very slow - wrong index used
Previous Message Greg Smith 2011-10-04 22:32:00 Re: : PG9.0 - Checkpoint tuning and pg_stat_bgwriter