Re: [PERFORM] Benchmarking PostgreSQL?

2004-01-25 Thread Ivan Voras
Tom Lane wrote:

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
I forgot to mention that - I read the pgbench README, and the scale 
factor was set to 40.

(2) 50 xacts/client is too small to get anything reproducible; you'll
mostly be measuring startup transients.  I usually use 1000 xacts/client.
I was using 100 and 50, hoping that the larger value will help 
reproducability and the smaller just what you said - to measure startup 
time. What I also forgot to mention was that the numbers I was talking 
about were got by using '-C' pgbench switch. Without it the results wary 
from about 60 and 145 (same 'alternating' effects, etc).

Thanks, I will try 1000 transactions!

There's another thing I'm puzzled about: I deliberately used -C switch 
in intention to measure connection time, but with it, the numbers 
displayed by pgbench for 'tps with' and 'tps without connection time' 
are same to the 6th decimal place. Without -C, both numbers are more 
then doubled and are different by about 2-3 tps. (I was expecting that 
with -C the 'tps with c.t.' would be much lower than 'tps without c.t.').

(the README is here: 
http://developer.postgresql.org/cvsweb.cgi/pgsql-server/contrib/pgbench/README.pgbench)



---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
  http://www.postgresql.org/docs/faqs/FAQ.html


Re: [PERFORM] Benchmarking PostgreSQL?

2004-01-24 Thread Tom Lane
Ivan Voras [EMAIL PROTECTED] 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

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org