Re: Bgwriter LRU cleaning: we've been going at this all wrong - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bgwriter LRU cleaning: we've been going at this all wrong
Date
Msg-id 17390.1182955134@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bgwriter LRU cleaning: we've been going at this all wrong  (Greg Smith <gsmith@gregsmith.com>)
Responses Re: Bgwriter LRU cleaning: we've been going at this all wrong  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Greg Smith <gsmith@gregsmith.com> writes:
> What may need to happen here is to add Tom's approach, but perhaps 
> restrain it using the current auto-tuning LRU patch's method of estimating 
> how many clean buffers are needed in the near future.  Particularly on 
> large buffer caches, the idea of getting so far ahead of the sweep that 
> you're looping all the away around and following right behind the clock 
> sweep point may be overkill, but I think it will help enormously on 
> smaller caches that are often very dirty.

I don't really see why it's "overkill".  My assumption is that it won't
really be hard to lap the clock sweep during startup --- most likely,
on its first iteration the bgwriter will see all of the cache as not a
candidate for writing (invalid, or at worst just touched) and will be
caught up before any real load materializes.  So the question is not can
it get into that state, it's whether it can stay there under load.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: tsearch in core patch
Next
From: Gregory Stark
Date:
Subject: Re: Bgwriter LRU cleaning: we've been going at this all wrong