pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <greg@2ndQuadrant.com>
To: tv@fuzzy.cz
Cc: pgsql-performance@postgresql.org
Subject: Re: strange pgbench results (as if blocked at the end)
Date: Sun, 14 Aug 2011 20:28:58 -0400
Message-ID: <4E48684A.2070909@2ndQuadrant.com> (raw)
In-Reply-To: <bdf03aa0550140de6491b3ce6d3eebd4@mail.gransy.com>
References: <2f9ba8ed6e4ed11d9a6d236cb4d2a2ec.squirrel@sq.gransy.com>
	<4E45EAD3.9030102@2ndQuadrant.com>
	<bdf03aa0550140de6491b3ce6d3eebd4@mail.gransy.com>

On 08/14/2011 08:51 AM, tv@fuzzy.cz wrote:
> I've increased the test duration to 10 minutes, decreased the
> checkpoint timeout to 4 minutes and a checkpoint is issued just before
> the pgbench. That way the starting position should be more or less the
> same for all runs.
>    

That's basically what I settled on for pgbench-tools.  Force a 
checkpoint just before the test, so the beginning of each run is aligned 
more consistently, then run for long enough that you're guaranteed at 
least one checkpoint finishes[1] (and you might see more than one if you 
fill checkpoint_segments fast enough).  I never bothered trying to 
compress that test cycle down by decreasing checkpoint_timeout.  There's 
already too many things you need to do in order to get this test working 
well, and I didn't want to include a change I'd never recommend people 
make on a production server in the mix.

[1] If your checkpoint behavior goes pathological, for example the 
extended checkpoints possible when the background writer fsync queue 
fills, it's not actually guaranteed that the checkpoint will finish 
within 5 minutes after it starts.  So a 10 minute run doesn't assure 
you'll a checkpoint begin and end in all circumstances, but it is the 
expected case.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us




view thread (9+ messages)  latest in thread

Message-ID: <4E48684A.2070909@2ndQuadrant.com>
Permalink:  ../4E48684A.2070909@2ndQuadrant.com/
Also on:    postgresql.org/message-id/4E48684A.2070909@2ndQuadrant.com

 · 

reply

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, tv@fuzzy.cz
  Subject: Re: strange pgbench results (as if blocked at the end)
  In-Reply-To: <4E48684A.2070909@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