> > Only if you redefine the meaning of bgwriter_percent. At present it's
> > defined by reference to the total number of dirty pages, and that can't
> > be known without collecting them all.
> >
> > If it were, say, a percentage of the total length of the T1/T2 lists,
> > then we'd have some chance of stopping the scan early.
> The other way around would make sense. In order to avoid writing the
> busiest buffers at all (except for checkpoinging), the parameter should
> mean "don't scan the last x% of the queue at all".
Your meaning is 1 - above meaning (at least that is what Tom and I meant),
but is probably easier to understand (== Informix LRU_MIN_DIRTY).
> Still, we need to avoid scanning over all the clean blocks of a large
> buffer pool, so there is need for a separate dirty-LRU.
Maybe a "may be dirty" bitmap would be easier to do without beeing deadlock prone ?
Andreas