Re: Bgwriter strategies

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: Bgwriter strategies
Дата
Msg-id Pine.GSO.4.64.0707060616490.3474@westnet.com
обсуждение исходный текст
Ответ на Re: Bgwriter strategies  (Heikki Linnakangas <heikki@enterprisedb.com>)
Ответы Re: Bgwriter strategies
Список pgsql-hackers
On Fri, 6 Jul 2007, Heikki Linnakangas wrote:

> To strike a balance between cleaning buffers ahead of possible bursts in the 
> future and not doing unnecessary I/O when no such bursts come, I think a 
> reasonable strategy is to write buffers with usage_count=0 at a slow pace 
> when there's no buffer allocations happening.

One idea I had there was to always scan max_pages buffers each time even 
if there were less allocations than needed for that.  That number is 
usually relatively small compared to the size of the buffer cache, so it 
would creep through the buffer cache at a bounded pace during idle 
periods.  It's actually nice to watch the LRU cleaner get so far ahead 
during idle spots that it catches the strategy point, so that when the 
next burst comes, it doesn't have to do anything until there's a full lap 
by the clock sweep.

Anyway, completely with you on the rest of this post, everything you said 
matches the direction I've been trudging toward.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD


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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Checkpoints and buffers that are hint-bit-dirty
Следующее
От: Greg Smith
Дата:
Сообщение: Tidied up patch status page