Re: PATCH: regular logging of checkpoint progress - Mailing list pgsql-hackers

From Noah Misch
Subject Re: PATCH: regular logging of checkpoint progress
Date
Msg-id 20110827040138.GC29429@tornado.leadboat.com
Whole thread Raw
In response to Re: PATCH: regular logging of checkpoint progress  ("Tomas Vondra" <tv@fuzzy.cz>)
Responses Re: PATCH: regular logging of checkpoint progress
Re: PATCH: regular logging of checkpoint progress
List pgsql-hackers
On Fri, Aug 26, 2011 at 10:46:33AM +0200, Tomas Vondra wrote:
> Hmmm, let me explain what led me to this patch - right now I'm doing a
> comparison of filesystems with various block sizes (both fs and db
> blocks). I've realized that the db block size significantly influences
> frequency of checkpoints and amount of data to write, so I'm collecting
> data from pg_stat_bgwriter too. The benchmark goes like this
> 
> 1. collect pg_stat_bgwriter stats
> 2. run pgbench for 10 minutes
> 3. collect pg_stat_bgwriter stats (to compute difference with (1))
> 4. kill the postmaster
> 
> The problem is that when checkpoint stats are collected, there might be a
> checkpoint in progress and in that case the stats are incomplete. In some
> cases (especially with very small db blocks) this has significant impact
> because the checkpoints are less frequent.

Could you remove this hazard by adding a step "2a. psql -c CHECKPOINT"?

-- 
Noah Misch                    http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: cheaper snapshots redux
Next
From: Gokulakannan Somasundaram
Date:
Subject: Re: cheaper snapshots redux