Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 57DFF650127 for ; Tue, 28 Oct 2008 09:47:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 36386-02-8 for ; Tue, 28 Oct 2008 09:47:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.yitter.info (mail.yitter.info [208.86.224.201]) by postgresql.org (Postfix) with ESMTP id 769CE65013E for ; Tue, 28 Oct 2008 09:47:19 -0300 (ADT) Received: from crankycanuck.ca (CPE001b63afe888-CM001adea9c5a6.cpe.net.cable.rogers.com [99.236.211.160]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.yitter.info (Postfix) with ESMTPSA id 3C90B2FE9948 for ; Tue, 28 Oct 2008 12:47:18 +0000 (UTC) Date: Tue, 28 Oct 2008 08:47:16 -0400 From: Andrew Sullivan To: pgsql-performance@postgresql.org Subject: Re: Occasional Slow Commit Message-ID: <20081028124716.GE13363@crankycanuck.ca> Mail-Followup-To: Andrew Sullivan , pgsql-performance@postgresql.org References: <72dbd3150810271723w57859013v9c4e3718ae86fba@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <72dbd3150810271723w57859013v9c4e3718ae86fba@mail.gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200810/115 X-Sequence-Number: 31696 On Mon, Oct 27, 2008 at 05:23:37PM -0700, David Rees wrote: > However, occasionally, processing time will jump up significantly - > the average processing time is around 20ms with the maximum processing > time taking 2-4 seconds for a small percentage of transactions. Ouch! > > Turning on statement logging and analyzing the logs of the application > itself shows that step #4 is the culprit of the vast majority of the > slow transactions. My bet is that you're waiting on checkpoints. Given that you're on 8.3, start fiddling with the checkpoint_completion_target parameter. 0.7 might help. A -- Andrew Sullivan ajs@commandprompt.com +1 503 667 4564 x104 http://www.commandprompt.com/