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 [EMAIL PROTECTED] http://www.gregsmith.com Baltimore, MD

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to