Re: pg_test_fsync performance

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_test_fsync performance
Date: 2012-02-14 16:11:20
Message-ID: 20120214161120.GC25621@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 13, 2012 at 09:54:06PM -0500, Bruce Momjian wrote:
> On Mon, Feb 13, 2012 at 08:28:03PM -0500, Tom Lane wrote:
> > Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > > Instead of or in addition to a fixed number operations per test, maybe
> > > we should cut off each test after a certain amount of wall-clock time,
> > > like 15 seconds.
> >
> > +1, I was about to suggest the same thing. Running any of these tests
> > for a fixed number of iterations will result in drastic degradation of
> > accuracy as soon as the machine's behavior changes noticeably from what
> > you were expecting. Run them for a fixed time period instead. Or maybe
> > do a few, then check elapsed time and estimate a number of iterations to
> > use, if you're worried about the cost of doing gettimeofday after each
> > write.
>
> Good idea, and it worked out very well. I changed the -o loops
> parameter to -s seconds which calls alarm() after (default) 2 seconds,
> and then once the operation completes, computes a duration per
> operation.

Update patch applied, with additional fix for usage message, and use of
macros for start/stop testing.

I like this method much better because not only does it speed up the
test, but it also allows the write test, which completes very quickly,
to run longer and report more accurate numbers.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2012-02-14 18:45:52 Initial 9.2 pgbench write results
Previous Message Kevin Grittner 2012-02-14 15:34:09 Re: SSI rw-conflicts and 2PC