Benchmarking PostgreSQL?

От: Ivan Voras
Тема: Benchmarking PostgreSQL?
Дата: ,
(см: обсуждение, исходный текст)
Ответы: Re: Benchmarking PostgreSQL?  (Tom Lane)
Список: pgsql-performance

I'm conducting some benchmarking (mostly for fun and learning), and one
part of it is benchmarking PostgreSQL (7.4.1, on FreeBSD 4.9 and 5.2).
I'm using pgbench from the contrib directory, but I'm puzzled by the
results. I have little experience in benchmarking, but I don't think I
should be getting the scattered results I have.

- the computer is P3 @ 933MHz, 1Gb RAM
- I'm running pgbench with 35 clients and 50 transactions/client
- benchmark results are differentiating by about +/- 6 TPS. The results
are between 32 TPS and 44 TPS
- the results seem to be getting worse over time then suddenly jumping
to the maximum (saw-tooth like). Sometime there is even (very noticable
as a pattern!) indication of more-or-less regular alteration between the
minimum and maximum values (e.g. first measurement yields 32, second
yields 44, third again 32 or 31, etc...)
- running vacuumdb -z -f on the database does not influence the results
in predictable ways
- waiting (sleeping) between pgbench runs (either regular or random)
does not influence it in predictable ways
- the same patterns appear between operating systems (FreeBSD 4.9 and
5.2) and reinstalls of it (the numbers are ofcourse somewhat different)

postgresql.conf contains only these active lines:
  max_connections = 40
  shared_buffers = 10000
  sort_mem = 8192
  vacuum_mem = 32768

I've used these settings as they are expected to be used on a regular
work load when the server goes into production. I've upped vacuum_mem as
it seems to shorten vacuum times dramaticaly (I assume the memory is
allocated when needed as the postgresql process is only 88MB in size
(80Mb shared buffers)).

What I'm really asking here is: are these results normal? If not, can
they be improved, or is there a better off-the-shelf PostgreSQL
benchmark tool?

В списке pgsql-performance по дате сообщения:

От: Tom Lane
Сообщение: Re: Benchmarking PostgreSQL?
От: Nick Barr
Сообщение: Re: Persistent Connections