Re: Question regarding clock-sweep

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Question regarding clock-sweep
Date: 2005-04-11 06:49:06
Message-ID: 22481.1113202146@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> Now that I'm beginning serious performance testing of clock-sweep, I
> was going back through the lock discussion and am not sure what the
> patch that actually went in 3 weeks ago consisted of. Is it
> clock-sweep with a used/unused bit or a counter? How is it handling
> seq scans?

It's clock-sweep with a counter. The counter increments on reference,
up to a small maximum value (BM_MAX_USAGE_COUNT in buf_internals.h),
and decrements when the clock hand passes over the buffer. I'd be
interested to see trials with different values of BM_MAX_USAGE_COUNT
... I made it 5 to start with but that was a WAG.

There's not any special smarts for seqscans, but the counter should
handle that.

> Oh, and incidentally, can I use the same database files for 8.0.2 and 8.1cvs
> 3/10/05?

Sorry, we forced initdb already several times...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Hansen 2005-04-11 10:54:46 Recursive types?
Previous Message Neil Conway 2005-04-11 05:19:48 Re: Question regarding clock-sweep