Re: pgbench duration option - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgbench duration option
Date
Msg-id 7796.1218596413@sss.pgh.pa.us
Whole thread Raw
In response to pgbench duration option  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: pgbench duration option  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Re: pgbench duration option  (Greg Smith <gsmith@gregsmith.com>)
List pgsql-hackers
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> Here is a patch to add duration option (-T) to pgbench instead of
> number of transactions (-t). -t and -T are mutually exclusive.

This seems like a fairly bad idea, because it introduces a
gettimeofday() call per transaction.  On lots of (admittedly mostly
low-end) hardware, that will impose enough overhead to seriously
affect the results.  Worse, the overhead is imposed on the client
side, which is already the bottleneck for pgbench tests.

If this were worth doing (which IMHO it isn't) the appropriate
implementation would be to set up a timer signal handler that would set
a flag to shut down the test after the appropriate amount of time.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Euler Taveira de Oliveira
Date:
Subject: Re: temporary statistics option at initdb time
Next
From: Tom Lane
Date:
Subject: Re: Planner question