Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 392371337B4E for ; Tue, 22 Feb 2011 20:38:36 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 37877-06 for ; Wed, 23 Feb 2011 00:38:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mail.postgresql.org (Postfix) with ESMTP id 8198A1337B47 for ; Tue, 22 Feb 2011 20:38:28 -0400 (AST) Received: from [192.168.1.6] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0Lxuke-1Q4E1X20vs-015tjj; Wed, 23 Feb 2011 01:38:27 +0100 Message-ID: <4D645702.40203@2ndquadrant.com> Date: Tue, 22 Feb 2011 19:38:26 -0500 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Sam Nelson CC: pgsql-admin@postgresql.org Subject: Re: Checkpoint and Background Writer Statistics References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:5vWIVH0GzT8nKpQnd0MK1GQrtobs9ypRZxjKG3NaCmu 7O3Aui+fxzWXj7KQq1IZB6MDHVjiHtur21QAWQmqe/xLU03rbO QcigKih712XUv5Vka49dyhW1pHeKbNI9J8jzFRXCjQL4wJw5e+ mSdCaCSwnksOlwNvwfyxdQhWFLCbrmokuBQ1UbChTwCo3hRDSL WCriBlo1enAWTV4Jbvena2Ar3VttmzWjnYZj8pZ4Lk= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201102/199 X-Sequence-Number: 36838 Sam Nelson wrote: > One of our clients has an lru_max_dirty setting of 1000 and a > bgwriter_delay of 200, but we're still seeing much higher growth in > the buffers_checkpoint than buffers_clean, with buffers_checkpoint > increasing at about 20 times the rate that buffers_clean is. We don't > see very much growth in the maxwritten_clean, though - something like > one every couple of days. The background writer can only clean data pages that haven't been used in a while. In your case, it sounds like most of the things that are getting dirty are being touched enough that they never meet its criteria. There's nothing wrong with that. Writing out dirty buffers only once per checkpoint is in theory the most efficient way to handle regularly changed data. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us "PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books