Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

In response to


pgsql-hackers by date

Next:From: Fabien COELHODate: 2007-06-27 07:53:40
Subject: Re: Frustrating issue with PGXS
Previous:From: Bruce McAlisterDate: 2007-06-27 07:14:07
Subject: Re: AutoVacuum Behaviour Question

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group