Skip site navigation (1) Skip section navigation (2)

Re: Configuring PostgreSQL to minimize impact of checkpoints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: Jack Orenstein <jao(at)geophile(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: Configuring PostgreSQL to minimize impact of checkpoints
Date: 2004-05-11 14:41:48
Message-ID: 9758.1084286508@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Jan Wieck <JanWieck(at)Yahoo(dot)com> 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

In response to

pgsql-performance by date

Next:From: Rob FieldingDate: 2004-05-11 15:12:20
Subject: Re: Configuring PostgreSQL to minimize impact of checkpoints
Previous:From: Matthew NuzumDate: 2004-05-11 13:35:18
Subject: Re: Configuring PostgreSQL to minimize impact of checkpoints

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group