Re: usleep feature for pgbench - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: usleep feature for pgbench
Date
Msg-id 468DAFD5.30002@Yahoo.com
Whole thread Raw
In response to Re: usleep feature for pgbench  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: usleep feature for pgbench
List pgsql-hackers
On 7/5/2007 5:30 PM, Tom Lane wrote:
> Jan Wieck <JanWieck@Yahoo.com> writes:
>> I think I've coded it in a way that if one doesn't use the \usleep 
>> command at all, it will never even call gettimeofday() and use a NULL 
>> timeout in select() as it used to.
> 
> Did you check that the observed performance for non-usleep-using scripts
> didn't change?  If this extra overhead causes a reduction in reported
> TPS rates it would make it hard to compare older and newer tests.

Given pgbench's unpredictability of results ... lets see.

I ran
    dropdb x    createdb x    pgbench -i -s10 x    psql -c 'checkpoint' x    sleep 1    psql -c 'checkpoint' x
pgbench-s10 -c5 -t10000 x    pgbench -s10 -c5 -t10000 x    pgbench -s10 -c5 -t10000 x
 

Original pgbench reported 39, 37 and 33 TPS. Having my patch applied it 
reported 40, 38 and 33 TPS. Inserting a "\usleep 1" after the update to 
accounts of a default equivalent script changed those numbers to 40, 37 
and 33. I interpret that as "does not change observed performance".

> 
> Other than that I've got no objection to it.

Will be committed after adjusting the README.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: enable-integer-datetimes vs datetime hash functions
Next
From: Tatsuo Ishii
Date:
Subject: tsearch2: language or encoding