X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 06937D9DE0 for ; Wed, 9 Nov 2005 15:19:47 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 37570-05 for ; Wed, 9 Nov 2005 19:19:46 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 57D6BD9D91 for ; Wed, 9 Nov 2005 15:19:45 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jA9JJ9LX018348; Wed, 9 Nov 2005 14:19:09 -0500 (EST) To: Marcin Giedz Cc: pgsql-admin@postgresql.org Subject: Re: Xeon vs Opteron - tests and questions In-reply-to: <200511091526.51685.marcin.giedz@eulerhermes.pl> References: <200511091526.51685.marcin.giedz@eulerhermes.pl> Comments: In-reply-to Marcin Giedz message dated "Wed, 09 Nov 2005 15:26:51 +0100" Date: Wed, 09 Nov 2005 14:19:09 -0500 Message-ID: <18347.1131563949@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006] X-Spam-Score: 0.006 X-Spam-Level: X-Archive-Number: 200511/96 X-Sequence-Number: 19469 Marcin Giedz 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