Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A514137BD1B for ; Wed, 8 Oct 2008 15:16:37 -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 02713-03 for ; Wed, 8 Oct 2008 15:16:34 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by postgresql.org (Postfix) with ESMTP id AAD6137BAB6 for ; Wed, 8 Oct 2008 15:16:34 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so4039552rvf.43 for ; Wed, 08 Oct 2008 11:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=nVVcx15KoWWNFeF3DNP4lgSKtNSUcoq2n7Ljjq5rq74=; b=WmP8tXwcy12i7R/vdGGTpxw48VmpmQR1FyUt2fc9wZKSVMWZioRN2pECJN97twHq2z vrhuUuEHCxcNNKJWxMhUn+WPGm8yRpRxXF4GkTtNl92tWBlpDBBwUC19fI1isaKOo+XE 25pvVtXB+ptEa8Qa/dm+1MPbmwHpodNM5/vig= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=ZPookXwxFTiJO1K5tPSqRxjiW885G2pTO8lLmlR8JCidaMEtvLmofs7dYoytxNCn73 1QPVsEXoK6gQKZjXN9V2xxYCEMQQfouAJZGiXHvm/7tuSNCzOUYRsCC3m2PWjCZjRkQG ggV5TgMSP4Hr9fmNdvemJerZLWgT2Vyh8nxsM= Received: by 10.141.156.11 with SMTP id i11mr5313231rvo.1.1223489793549; Wed, 08 Oct 2008 11:16:33 -0700 (PDT) Received: by 10.140.248.12 with HTTP; Wed, 8 Oct 2008 11:16:33 -0700 (PDT) Message-ID: Date: Wed, 8 Oct 2008 12:16:33 -0600 From: "Scott Marlowe" To: "Kevin Grittner" Subject: Re: checkpoint_timeout Cc: "Rafael Domiciano" , "Julio Leyva" , "pgsql-admin@postgresql.org" In-Reply-To: <48ECB0DD.EE98.0025.0@wicourts.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3a0028490810071321j32b4f450m95123d02b9fe6f49@mail.gmail.com> <1223475780.6070.10.camel@bnicholson-desktop> <3a0028490810080734r26912c72n94d6f509dfb55b6e@mail.gmail.com> <3a0028490810080919v3762f924je688a56210558e95@mail.gmail.com> <3a0028490810080934l211d137uc9dde69cad7879d9@mail.gmail.com> <48EC9D9F.EE98.0025.0@wicourts.gov> <3a0028490810081054o2100b2bci7bde6b7213712c58@mail.gmail.com> <48ECB0DD.EE98.0025.0@wicourts.gov> 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/61 X-Sequence-Number: 30517 On Wed, Oct 8, 2008 at 12:08 PM, Kevin Grittner wrote: > > If the problem is checkpoints (which seems likely but far from a sure > thing based on the information provided), aggressive background writer > setting might be your best bet under 8.2.X. To solve similar problems > we had to go to the following, although many on these lists feel that > settings this aggressive are rarely needed, so use at your own risk. > > #bgwriter_delay = 200ms > bgwriter_lru_percent = 20.0 > bgwriter_lru_maxpages = 200 > bgwriter_all_percent = 10.0 > bgwriter_all_maxpages = 600 I've tuned an 8.2 server with settings similar to this, and it made a world of difference on smoothing out performance. Note that bgwriter tends to use cpu and memory bandwidth up, so avoid going crazy on it. > Even better would be to go to the latest revision of the 8.3 release, > which at this writing is 8.3.4. In that release PostgreSQL spreads > out the work of a checkpoint to minimize this problem. Seconded. A lot of hard work went into making the bgwriter much easier to adjust, and much less likely to even need adjusting in 8.3.