pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ivan Voras <ivoras@geri.cc.fer.hr>
Cc: pgsql-performance@postgresql.org
Subject: Re: Benchmarking PostgreSQL?
Date: Sat, 24 Jan 2004 21:55:50 -0500
Message-ID: <16506.1074999350@sss.pgh.pa.us> (raw)
In-Reply-To: <40131581.7000300@geri.cc.fer.hr>
References: <40131581.7000300@geri.cc.fer.hr>

Ivan Voras <ivoras@geri.cc.fer.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



view thread (3+ messages)  latest in thread

Message-ID: <16506.1074999350@sss.pgh.pa.us>
Permalink:  ../16506.1074999350@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16506.1074999350@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ivoras@geri.cc.fer.hr
  Subject: Re: Benchmarking PostgreSQL?
  In-Reply-To: <16506.1074999350@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox