Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id F16E52E2D5E; Sun, 20 Jan 2008 16:08:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 21095-04; Sun, 20 Jan 2008 16:08:42 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 4AC282E2D43; Sun, 20 Jan 2008 16:08:42 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id m0KK8eW2011683; Sun, 20 Jan 2008 15:08:40 -0500 (EST) To: Alvaro Herrera cc: pgsql-docs@postgresql.org, Hackers Subject: Re: bgwriter_lru_multiplier blurbs inconsistent In-reply-to: <20080120195519.GD22740@alvh.no-ip.org> References: <20080120195519.GD22740@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Sun, 20 Jan 2008 16:55:19 -0300" Date: Sun, 20 Jan 2008 15:08:40 -0500 Message-ID: <11682.1200859720@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/21 X-Sequence-Number: 4750 Alvaro Herrera writes: > Is the bgwriter_lru_multiplier parameter a limit on the number to scan > or to write? GUC and docs seem to contradict one another. GUC says > #: utils/misc/guc.c:1834 > #, fuzzy > msgid "Background writer multiplier on average buffers to scan per round." > The docs say > Unless limited by bgwriter_lru_maxpages, the number > of dirty buffers written in each round is determined by reference > to the number of new buffers that have been needed by server > processes during recent rounds. This number is multiplied by > bgwriter_lru_multiplier to arrive at the estimate > of the number of buffers that will be needed during the next round. > Which one is correct? Do we need a correction of either? We multiply the average number of new buffers used per round by the multiplier, and use that as the target for the number of clean buffers to have in front of the sweep hand. Any of these that are dirty will be written (until we exceed maxpages written). So it's the number to scan. I don't find either the docs or the msgid to be wrong, exactly; but if you have a proposal for better wording, I'm all ears. regards, tom lane