From: | Greg Smith <greg(at)2ndQuadrant(dot)com> |
---|---|
To: | tv(at)fuzzy(dot)cz |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: strange pgbench results (as if blocked at the end) |
Date: | 2011-08-15 00:28:58 |
Message-ID: | 4E48684A.2070909@2ndQuadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On 08/14/2011 08:51 AM, tv(at)fuzzy(dot)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(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
From | Date | Subject | |
---|---|---|---|
Next Message | Igor Neyman | 2011-08-15 18:19:45 | Re: How to see memory usage using explain analyze ? |
Previous Message | Tom Lane | 2011-08-14 17:33:44 | Re: strange pgbench results (as if blocked at the end) |