Re: Background LRU Writer/free list - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Background LRU Writer/free list
Date
Msg-id 87ps61poy3.fsf@oxford.xeocode.com
Whole thread Raw
In response to Background LRU Writer/free list  (Greg Smith <gsmith@gregsmith.com>)
Responses Re: Background LRU Writer/free list
List pgsql-hackers
"Greg Smith" <gsmith@gregsmith.com> writes:

> I'm mostly done with my review of the "Automatic adjustment of
> bgwriter_lru_maxpages" patch.  In addition to issues already brought up with
> that code, there are some small things that need to be done to merge it with
> the recent pg_stat_bgwriter patch, and I have some concerns about its unbounded
> scanning of the buffer pool; I'll write that up in more detail or just submit
> an improved patch as I get time this week.

I had a thought on this. Instead of sleeping for a constant amount of time and
then estimating the number of pages needed for that constant amount of time
perhaps what bgwriter should be doing is sleeping for a variable amount of
time and estimating the length of time it needs to sleep to arrive at a
constant number of pages being needed.

The reason I think this may be better is that "what percentage of the shared
buffers the bgwriter allows to get old between wakeups" seems more likely to
be a universal constant that people won't have to adjust than "fixed time
interval between bgwriter cleanup operations".

Just a thought.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [RFC] PostgreSQL Access Control Extension (PGACE)
Next
From: Gregory Stark
Date:
Subject: Re: Backend Crash