On Thu, Jan 12, 2006 at 04:50:30AM -0500, Qingqing Zhou wrote:
>
>
> On Thu, 12 Jan 2006, Simon Riggs wrote:
> >
> > The only buffers this will miss are ones that were clean throughout the
> > whole of the last checkpoint cycle, yet have been dirtied between the
> > start of the checkpoint pass and when the pass reaches it.
>
> I agree on the analysis but I am not sure current interval of doing a
> checkpoint. So it depends. If the checkpoint on an io-intensive machine
> the interval I guess would not be small. Also, in this environment, one
> more round of lock cycle should be relatively cheap. But we currently
> don't have any numbers on hand ...
It sounds like worrying about this would be much more interesting on a
machine that is seeing both a fairly heavy IO load (meaning checkpoint
will both take longer and affect other workloads more) and is seeing a
pretty high rate of buffer updates (meaning that we'd likely do a bunch
of extra work as part of the checkpoint if we didn't take note of
exactly what buffers needed to be flushed). Unfortunately I don't think
there's any way for the backend to know much about either condition
right now, so it couldn't decide when it made sense to make a list of
buffers to flush. Maybe in the future...
As for the questionable benefit to delaying work for bgwriter or next
checkpoint, I think there's a number of scenarios where it would make
sense. A simple example is doing some kind of processing once a minute
that's IO intensive with default checkpoint timing. Sometimes a
checkpoint will occur at the same time as the once-a-minute process, and
in those cases reducing the amount of work the checkpoint does will
definately help even out the load on the machine.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461