Re: Bgwriter LRU cleaning: we've been going at this all wrong - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Bgwriter LRU cleaning: we've been going at this all wrong
Date
Msg-id 874pktualb.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Bgwriter LRU cleaning: we've been going at this all wrong  (Greg Smith <gsmith@gregsmith.com>)
Responses Re: Bgwriter LRU cleaning: we've been going at this all wrong
List pgsql-hackers
"Greg Smith" <gsmith@gregsmith.com> writes:

> On Tue, 26 Jun 2007, Heikki Linnakangas wrote:
>
>> How much of the buffer cache do you think we should try to keep clean? And
>> how large a percentage of the buffer cache do you think have usage_count=0 at
>> any given point in time?
>
> What I discovered is that most of the really bad checkpoint pause cases I ran
> into involved most of the buffer cache being dirty while also having a non-zero
> usage count, which left the background writer hard-pressed to work usefully
> (the LRU writer couldn't do anything, and the all-scan was writing wastefully).
> I was seeing >90% dirty+usage_count>0 in the really ugly spots.

You keep describing this as ugly but it sounds like a really good situation to
me. The higher that percentage the better your cache hit ratio is. If you had
80% of the buffer cache be usage_count 0 that would be about average cache hit
ratio. And if you had a cache hit ratio of zero then you would find as much as
little as 50% of the buffers with usage_count>0.

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



pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Bgwriter LRU cleaning: we've been going at this all wrong
Next
From: Fabien COELHO
Date:
Subject: Re: Frustrating issue with PGXS