pgbench duration option - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject pgbench duration option
Date
Msg-id 20080813102607.87A7.52131E4D@oss.ntt.co.jp
Whole thread Raw
Responses Re: pgbench duration option  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: Plugin system like Firefox
Next
From: Euler Taveira de Oliveira
Date:
Subject: Re: temporary statistics option at initdb time