Add pgbench option: CHECKPOINT before starting benchmark

Поиск
Список
Период
Сортировка
Hi,

I add checkpoint option to pgbench.

pgbench is simple and useful benchmark for every user. However, result of
benchmark greatly changes by some situations which are in executing checkpoint,
number of dirty buffers in share_buffers, and so on. For such a problem, it is
custom to carry out a checkpoint before starting benchmark. But it is a fact that
the making of the script takes time, like under following script.

psql -U postgres -d pgbench -p5432 -c "CHECKPOINT"
pgbench -T 600 -c 12 -j4 -U postgres -d pgbench -p 5432

However, this script have a problem.
This script execute "CHECKPOINT" -> "VACUUM" -> "starting benchmark".
If relpages have lot of dirty pages, VACUUM generate dirty buffers on
shared_buffers, and it will cause bad heavily checkpoint.

I think pgbench would be more easy and accuracy benchmark tools for everyone. So
I set checkpoint before starting benchmark.

This patch's output is here.
-----------------------------------------------------
[mitsu-ko@localhost pgbench]$ ./pgbench
starting vacuum...end.
starting checkpoint...end.
transaction type: TPC-B (sort of)
scaling factor: 1
query mode: simple
number of clients: 1
number of threads: 1
number of transactions per client: 10
number of transactions actually processed: 10/10
tps = 312.851958 (including connections establishing)
tps = 364.524478 (excluding connections establishing)
-----------------------------------------------------
It execute "VACUUM" -> "CHECKPOINT" -> "starting benchmark".
I think it is ideal setting for more accuracy benchmark.

My patches option difinition is here.
[mitsu-ko@localhost pgbench]$ ./pgbench --help
~
-N, --no-checkpoint      do not run CHECKPOINT after initialization
~
In latest commited pgbench, -N is "--skip-some-updates  skip updates of
pgbench_tellers and pgbench_branches". But I cannot understand why -N is this
option, so I set this option -u, and -N is "do not run CHECKPOINT option".

What do you think?
--
Mitsumasa KONDO
NTT Open Source Software Center

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Compression of full-page-writes
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: Add pgbench option: CHECKPOINT before starting benchmark