Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 6DECB9FC2C0 for ; Fri, 23 Feb 2007 16:02:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 74804-08 for ; Fri, 23 Feb 2007 16:02:28 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 72C739FC295 for ; Fri, 23 Feb 2007 16:02:25 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id 9275156476; Fri, 23 Feb 2007 14:02:17 -0600 (CST) Received: (hashcash-sendmail, from uid 1001); Fri, 23 Feb 2007 14:02:15 -0600 Date: Fri, 23 Feb 2007 14:02:15 -0600 From: "Jim C. Nasby" To: Jeff Davis Cc: pgsql-performance@postgresql.org Subject: Re: long checkpoint_timeout Message-ID: <20070223200215.GA11743@nasby.net> References: <1172254469.10824.243.camel@dogma.v10.wvs> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1172254469.10824.243.camel@dogma.v10.wvs> X-Operating-System: FreeBSD 6.1-RELEASE-p10 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.13 (2006-08-11) X-Hashcash: 1:20:070223:pgsql@j-davis.com::n+HytNRbX4Tr8LTV:00000000000000000000 00000000000000000000000015DI X-Hashcash: 1:20:070223:pgsql-performance@postgresql.org::tupzDk/T/IEkdzF9:00000 0000000000000000000000006WAz X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/258 X-Sequence-Number: 23312 On Fri, Feb 23, 2007 at 10:14:29AM -0800, Jeff Davis wrote: > The postgresql.conf says that the maximum checkpoint_timeout is 1 hour. > However, the following messages seem to suggest that it may be useful to > set the value significantly higher to reduce unnecessary WAL volume: > > http://archives.postgresql.org/pgsql-hackers/2006-10/msg00527.php > http://archives.postgresql.org/pgsql-hackers/2006-08/msg01190.php > > Is there a reason for the hour-long limit on checkpoint_timeout? Is > there a cost to doing so, aside from potentially longer recovery time? > > As I understand it, the background writer keeps the I/O more balanced > anyway, avoiding I/O spikes at checkpoint. > > I don't need the checkpoint time to be higher than 1 hour, but I'm > trying to understand the reasoning behind the limit and the implications > of a longer checkpoint_timeout. > > The docs here: > > http://www.postgresql.org/docs/current/static/wal-configuration.html > > say that checkpoints cause extra disk I/O. Is there a good way to > measure how much extra I/O (and WAL volume) is caused by the > checkpoints? Also, it would be good to know how much total I/O is caused > by a checkpoint so that I know if bgwriter is doing it's job. There's a patch someone just came up with that provides additional debug info about both bgwriter operation and checkpoints. I know it will at least tell you how much was written out by a checkpoint. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)