From: | Greg Smith <gsmith(at)gregsmith(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Bgwriter strategies |
Date: | 2007-07-07 08:02:07 |
Message-ID: | Pine.GSO.4.64.0707060616490.3474@westnet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2007-07-07 08:07:32 | Tidied up patch status page |
Previous Message | Gregory Stark | 2007-07-07 03:29:42 | Checkpoints and buffers that are hint-bit-dirty |