X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 43AEAD1B3B2 for ; Tue, 11 May 2004 11:42:06 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 24247-03 for ; Tue, 11 May 2004 11:41:50 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id BEB0CD1B578 for ; Tue, 11 May 2004 11:41:45 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i4BEfnFf009759; Tue, 11 May 2004 10:41:49 -0400 (EDT) To: Jan Wieck Cc: Jack Orenstein , pgsql-performance@postgresql.org Subject: Re: Configuring PostgreSQL to minimize impact of checkpoints In-reply-to: <40A0E069.9000006@Yahoo.com> References: <200405101909.i4AJ9Wv09415@candle.pha.pa.us> <40A03435.7020300@geophile.com> <24638.1084245829@sss.pgh.pa.us> <40A0E069.9000006@Yahoo.com> Comments: In-reply-to Jan Wieck message dated "Tue, 11 May 2004 10:17:13 -0400" Date: Tue, 11 May 2004 10:41:48 -0400 Message-ID: <9758.1084286508@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/70 X-Sequence-Number: 6901 Jan Wieck writes: > If we would combine the background writer and the checkpointer, ... which in fact is on my agenda of things to do ... > then a > "checkpoint flush" could actually be implemented as a temporary change > in that activity that basically is done by not reevaluating the list of > to be flushed blocks any more and switching to a constant amount of > blocks flushed per cycle. When that list get's empty, the checkpoint > flush is done, the checkpoint can complete and the background writer > resumes normal business. Sounds like a plan. I'll do it that way. However, we might want to have different configuration settings controlling the write rate during checkpoint and the rate during normal background writing --- what do you think? Also, presumably a shutdown checkpoint should just whomp out the data without any delays. We can't afford to wait around and risk having init decide we took too long. >> None of this is necessarily going to fix matters for an installation >> that has no spare I/O capacity, though. > As a matter of fact, the background writer increases the overall IO. It > writes buffers that possibly get modified again before a checkpoint or > their replacement requires them to be finally written. So if there is no > spare IO bandwidth, it makes things worse. Right, the trickle writes could be wasted effort. regards, tom lane