Re: pgbench duration option

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench duration option
Date: 2008-08-13 03:00:13
Message-ID: 7796.1218596413@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-08-13 03:07:47 Re: Planner question
Previous Message ITAGAKI Takahiro 2008-08-13 01:55:24 pgbench duration option