Add accurate option to pgbench - Mailing list pgsql-hackers

From Mitsumasa KONDO
Subject Add accurate option to pgbench
Date
Msg-id CADupcHWt299VMvCnup9mSAibd_Aup1fyLNhA6rfZpNVmMoJNcA@mail.gmail.com
Whole thread Raw
Responses Re: Add accurate option to pgbench  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,

I create pgbench patch that adding accurate option in benchmark, and submit it in CF3.
It is simple option to get more accurate benchmark result and to avoid miss benchmark result in pgbench.

Logic of this option is under following.
  1. execute cluster command to sort records.
  2. execute checkpoint to clear dirty-buffers in shared_buffers.
  3. execute sync command to clear dirty-file-caches in OS.
  4. waiting 10 seconds for raid cache is until empty .
  5. execute checkpoint to init checkpoint_timeout and checkpoint_segments.
  6. start benchmark.

Sample output is under following.

[mitsu-ko@vm-kondo pgbench]$ ./pgbench -a
starting cluster...end.
starting checkpoint...end.
starting sync all buffers and wait 10 seconds...end.
transaction type: TPC-B (sort of)
scaling factor: 1
query mode: simple
accurate mode: on
number of clients: 1
number of threads: 1
number of transactions per client: 10
number of transactions actually processed: 10/10
latency average: 0.000 ms
tps = 187.677120 (including connections establishing)
tps = 236.417798 (excluding connections establishing)


I hope that it will be reccomended pgbench option in commnity development.
However, it might too carefuly option before starting benchmark.
Please give me comments.

Regards,
--
Mitsumasa KONDO
NTT Open Source Software Center
Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Something fishy happening on frogmouth
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Using indices for UNION.