X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2F1E3D1D189 for ; Sun, 25 Jan 2004 02:56:16 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 91145-06 for ; Sat, 24 Jan 2004 22:55:53 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 1BD13D1E3F0 for ; Sat, 24 Jan 2004 22:55:44 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id i0P2tonX016507; Sat, 24 Jan 2004 21:55:50 -0500 (EST) To: Ivan Voras Cc: pgsql-performance@postgresql.org Subject: Re: Benchmarking PostgreSQL? In-reply-to: <40131581.7000300@geri.cc.fer.hr> References: <40131581.7000300@geri.cc.fer.hr> Comments: In-reply-to Ivan Voras message dated "Sun, 25 Jan 2004 02:01:53 +0100" Date: Sat, 24 Jan 2004 21:55:50 -0500 Message-ID: <16506.1074999350@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/262 X-Sequence-Number: 5436 Ivan Voras 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