Add accurate option to pgbench

From: Mitsumasa KONDO <kondo(dot)mitsumasa(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Add accurate option to pgbench
Date: 2013-10-31 10:36:45
Message-ID: CADupcHWt299VMvCnup9mSAibd_Aup1fyLNhA6rfZpNVmMoJNcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)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 Content-Type Size
pgbench_accurate_option_v0.patch application/octet-stream 3.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2013-10-31 10:42:51 Using indices for UNION.
Previous Message Andres Freund 2013-10-31 09:50:21 Re: Something fishy happening on frogmouth