Re: Bgwriter LRU cleaning: we've been going at this all wrong

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Greg Smith" <gsmith(at)gregsmith(dot)com>
Cc: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Bgwriter LRU cleaning: we've been going at this all wrong
Date: 2007-06-27 07:21:04
Message-ID: 874pktualb.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Greg Smith" <gsmith(at)gregsmith(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2007-06-27 07:53:40 Re: Frustrating issue with PGXS
Previous Message Bruce McAlister 2007-06-27 07:14:07 Re: AutoVacuum Behaviour Question