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

Re: WIP: 2nd-generation buffer ring patch

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: WIP: 2nd-generation buffer ring patch
Date: 2007-05-30 03:35:23
Message-ID: Pine.GSO.4.64.0705292306590.12775@westnet.com (view raw or flat)
Thread:
Lists: pgsql-patches
On Tue, 29 May 2007, Tom Lane wrote:

> Do we have any decent way of measuring the effectiveness of the 
> clock-sweep allocation algorithm?

I put a view on top of the current pg_buffercache (now that it include 
usage_count) that shows what the high usage_count buffers consist of. 
Since they were basically what I hoped for (like plenty of index blocks on 
popular tables) that seemed a reasonable enough measure of effectiveness 
for my purposes.  I briefly looked into adding some internal measurements 
in this area, like how many buffers are scanned on average to satisfy an 
allocation request; that would actually be easy to add to the buffer 
allocation stats part of the auto bgwriter_max_pages patch I submitted 
recently.

Based on my observations of buffer cache statistics, the number of pinned 
buffers at any time is small enough that in a reasonably sized buffer 
cache, I wouldn't expect a change in the pinned usage_count behavior to 
have any serious impact.  With what you're adjusting, the only time I can 
think of that there would be a noticable shift in fairness would be if 
ones buffer cache was very small relative to the number of clients, which 
is kind of an unreasonable situation to go out of your way to accommodate.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2007-05-30 04:02:11
Subject: Re: WIP: 2nd-generation buffer ring patch
Previous:From: Jeff DavisDate: 2007-05-30 00:43:19
Subject: Re: Seq scans status update

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