Skip site navigation (1) Skip section navigation (2)

Re: Benchmarking PostgreSQL?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ivan Voras <ivoras(at)geri(dot)cc(dot)fer(dot)hr>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Benchmarking PostgreSQL?
Date: 2004-01-25 02:55:50
Message-ID: 16506.1074999350@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Ivan Voras <ivoras(at)geri(dot)cc(dot)fer(dot)hr> writes:
> 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.

It is notoriously hard to get reproducible results from pgbench.
However...

> - I'm running pgbench with 35 clients and 50 transactions/client

(1) what scale factor did you use to size the database?  One of the
gotchas is that you need to use a scale factor at least as large as the
number of clients you are testing.  The scale factor is equal to the
number of rows in the "branches" table, and since every transaction
wants to update some row of branches, you end up mostly measuring the
effects of update contention if the scale factor is less than about
the number of clients.  scale 1 is particularly deadly, it means all
the transactions get serialized :-(

(2) 50 xacts/client is too small to get anything reproducible; you'll
mostly be measuring startup transients.  I usually use 1000 xacts/client.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Nick BarrDate: 2004-01-25 11:28:28
Subject: Re: Persistent Connections
Previous:From: Octavio AlvarezDate: 2004-01-25 02:12:42
Subject: Re: Slow delete times??

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group