Re: Page replacement algorithm in buffer cache

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Page replacement algorithm in buffer cache
Дата
Msg-id 3949.1364921816@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Page replacement algorithm in buffer cache  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Page replacement algorithm in buffer cache  (Andres Freund <andres@2ndquadrant.com>)
Re: Page replacement algorithm in buffer cache  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2013-04-02 12:22:03 -0400, Tom Lane wrote:
>> I agree in general, though I'm not sure the bgwriter process can
>> reasonably handle this need along with what it's already supposed to be
>> doing.  We may need another background process that is just responsible
>> for keeping the freelist populated.

> What else is the bgwriter actually doing otherwise? Sure, it doesn't put the
> pages on the freelist, but otherwise its trying to do the above isn't it?

I think it will be problematic to tie buffer-undirtying to putting both
clean and dirty buffers into the freelist.  It might chance to work all
right to use one scan process for both, but I'm afraid it's more likely
that we'd end up either overserving one goal or underserving the other.

Also note the entire design of BgBufferSync right now is predicated on
the assumption that the rate of motion of the scan strategy point
reflects the rate at which new buffers are needed.  If backends are
supposed to always get new buffers from the freelist, that logic becomes
circular: the bgwriter would be watching itself.  Perhaps we can
refactor the feedback control loop logic so that the buffer scan rate is
driven by changes in the length of the freelist, but I'm not sure
exactly what the consequences would be.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Page replacement algorithm in buffer cache
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Page replacement algorithm in buffer cache