Re: New features for pgbench

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: New features for pgbench
Date: 2007-02-12 04:57:48
Message-ID: Pine.GSO.4.64.0702112328270.24168@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Sun, 11 Feb 2007, Tom Lane wrote:

> Does this have any impact on the reported results (by slowing pg_bench
> itself)?

I didn't put more code than I had to in the transaction path, to avoid any
slowdown. I didn't convert the timestamp to human readable format or
anything intensive like that to avoid impacting the pgbench results.
It's just dumping some data that was already sitting there.

There is an extra if statement for each transaction, and a slightly longer
fprintf when running with the extra latency output in place. That's it.
The file gets "%d %d %.0f %d %ld %ld\n" instead of "%d %d %.0f\n"

The main drawback to logging more as the default is about twice as much
disk I/O for writing the latency log out. That's small change compared
with the WAL/database writes that must be going on to generate that
transaction, and I sure haven't been able to measure any change in
results.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-02-12 05:21:22 Re: New features for pgbench
Previous Message Joshua D. Drake 2007-02-12 04:29:18 Re: New features for pgbench