pgbench duration option

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pgbench duration option
Date: 2008-08-13 01:55:24
Message-ID: 20080813102607.87A7.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

Here is a patch to add duration option (-T) to pgbench instead of
number of transactions (-t). -t and -T are mutually exclusive.

$ pgbench -n -S -c10 -T10
transaction type: SELECT only
scaling factor: 1
query mode: simple
number of clients: 10
number of transactions actually processed: 22522 in 10 s
tps = 2248.686427 (including connections establishing)
tps = 2298.896332 (excluding connections establishing)

I have some experiences where duration-based tests are better than
num-of-xacts-based. For example, testing checkpoints with pgbench
(checkpoints occurs periodically) or endurance test over a weekend
(it should run through 48 hours).

BTW, we have the following notes in the documentation:

| F.18.5. Good Practices
| In the first place, never believe any test that runs for only a few seconds.
| Increase the -t setting enough to make the run last at least a few minutes,
| so as to average out noise.

If there were -T option, we could rewrite it as
"Increate the -T setting to 300 (5 minutes) or larger" or something.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Attachment Content-Type Size
pgbench-duration.patch application/octet-stream 5.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-08-13 03:00:13 Re: pgbench duration option
Previous Message David E. Wheeler 2008-08-13 01:54:43 Re: Plugin system like Firefox