Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id BAA182E008F for ; Sun, 3 Feb 2008 17:18:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 12395-03 for ; Sun, 3 Feb 2008 17:17:54 -0400 (AST) Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id D28E22E005C for ; Sun, 3 Feb 2008 17:17:58 -0400 (AST) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id m13LHtqh020049; Sun, 3 Feb 2008 16:17:56 -0500 (EST) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id m13LHtO1020044; Sun, 3 Feb 2008 16:17:55 -0500 (EST) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Sun, 3 Feb 2008 16:17:55 -0500 (EST) From: Greg Smith X-X-Sender: gsmith@westnet.com To: Pavel Stehule cc: Postgresql Performance Subject: Re: slow 8.2.6 with 50 connections In-Reply-To: <162867790802030802h322ed3b8ja4c27a3fa57dc2bd@mail.gmail.com> Message-ID: References: <162867790802030802h322ed3b8ja4c27a3fa57dc2bd@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/6 X-Sequence-Number: 28548 On Sun, 3 Feb 2008, Pavel Stehule wrote: > postgres@Orbisek:/root$ /usr/local/pgsql/bin/pgbench -c10 -t 50000 test > scaling factor: 1 If you're running with the number of clients much greater than the scaling factor, it's unsurprising transactions are suffering from lock issues at higher client loads. It's good news that situation is much improved in 8.3 but I'm not sure how much you can conclude from that. Increasing scale will make the database bigger and drive down your results dramatically though, as it will get more disk-bound. Consider running pgbench with "-N", which removes updates to the branches/tellers table where the worse locking issues are at, and see if that changes how 8.2 and 8.3 compare. But try the things below first. The other thing to try is running the pgbench client on another system from the server itself. I've seen resultings showing this curve before (sharp dive at higher TPS) that flattened out considerably once that was done. > bgwriter_lru_percent = 20.0 > bgwriter_lru_maxpages = 200 > bgwriter_all_percent = 10 > bgwriter_all_maxpages = 600 Hmm, isn't that the set that Sun was using in their benchmarks? Unless you have more CPUs than your system does, these are way more aggressive than make sense--the percentages moreso than the pages. For pgbench tests, you'll probably find performance improves in every way if you just turn the background writer off in 8.2. I suspect that part of your 8.2 vs. 8.3 difference here is that the way you're 8.2 background writer is configured here is wasting all sorts of CPU and I/O resources doing unproductive things. 8.3 took away most of these parameters specifically to keep that from happening. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD