Re: RC2 and open issues - Mailing list pgsql-hackers

From Tom Lane
Subject Re: RC2 and open issues
Date
Msg-id 955.1103596527@sss.pgh.pa.us
Whole thread Raw
In response to RC2 and open issues  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: RC2 and open issues
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I think the ideal solution would be to remove bgwriter_percent or change
> it to be a percentage of all buffers, not just dirty buffers, so we
> don't have to scan the entire list.  If we set the new value to 10% with
> a delay of 1 second, and the bgwriter remembers the place it stopped
> scanning the buffer cache, you will clean out the buffer cache
> completely every 10 seconds.

But we don't *want* it to clean out the buffer cache completely.
There's no point in writing a "hot" page every few seconds.  So I don't
think I believe in remembering where we stopped anyway.

I think there's a reasonable case to be made for redefining
bgwriter_percent as the max percent of the total buffer list to scan
(not the max percent of the list to return --- Jan correctly pointed out
that the latter is useless).  Then we could modify
StrategyDirtyBufferList so that the percent and maxpages parameters are
passed in, so it can stop as soon as either one is satisfied.  This
would be a fairly small/safe code change and I wouldn't have a problem
doing it even at this late stage of the cycle.

Howeve ... we would have to crank up the default bgwriter_percent,
and I don't know if we have any better idea what to set it to after
such a change than we do now ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Heads up: RC2 this evening
Next
From: Tom Lane
Date:
Subject: Re: Heads up: RC2 this evening