pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marcin Giedz <marcin.giedz@eulerhermes.pl>
Cc: pgsql-admin@postgresql.org
Subject: Re: Xeon vs Opteron - tests and questions
Date: Wed, 09 Nov 2005 14:19:09 -0500
Message-ID: <18347.1131563949@sss.pgh.pa.us> (raw)
In-Reply-To: <200511091526.51685.marcin.giedz@eulerhermes.pl>
References: <200511091526.51685.marcin.giedz@eulerhermes.pl>

Marcin Giedz <marcin.giedz@eulerhermes.pl> writes:
> I made some test comparing postgresql 8.0.4 based on two servers. 
> Here is a link:
> http://85.128.68.44/

This is pretty nearly an ideal example of how NOT to use pg_bench :-(

In the first place, don't use a number of clients (-c) much exceeding
the scale factor (-s).  If you do, then almost all you are measuring is
the effects of update contention.  There are only scale-factor rows in
the branches table, and every pgbench transaction wants to update one of
the branches rows, so with -c 100 and -s 20 there are on average going
to be 5 transactions simultaneously trying to modify the same branches
row.  4 of them are going to be waiting.  Does that really correspond
to a real-world situation that you want to optimize?

In the second place, you need a run length considerably longer than
-t 100 to avoid getting swamped by noise of startup/shutdown overhead.
I usually use at least -t 1000 if I want repeatable numbers.

BTW, PG 8.1 will probably do better than 8.0 on multi-CPU hardware.

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <18347.1131563949@sss.pgh.pa.us>
Permalink:  ../18347.1131563949@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18347.1131563949@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, marcin.giedz@eulerhermes.pl
  Subject: Re: Xeon vs Opteron - tests and questions
  In-Reply-To: <18347.1131563949@sss.pgh.pa.us>
  References: <200511091526.51685.marcin.giedz@eulerhermes.pl> <18347.1131563949@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