Re: Clock sweep not caching enough B-Tree leaf pages? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Clock sweep not caching enough B-Tree leaf pages?
Date
Msg-id 7748.1398126488@sss.pgh.pa.us
Whole thread Raw
In response to Re: Clock sweep not caching enough B-Tree leaf pages?  (Jim Nasby <jim@nasby.net>)
Responses Re: Clock sweep not caching enough B-Tree leaf pages?
List pgsql-hackers
Jim Nasby <jim@nasby.net> writes:
> How *certain* are we that a single freelist lock (that actually ONLY
> protects the freelist) would be that big a deal?

We used to have one.  It was a big bottleneck --- and this was years
ago, when the buffer manager was much less scalable than it is today.
(IIRC, getting rid of a central lock was one of the main advantages
of the current clock sweep code over its predecessor.)

The real issue here is that in the modern code, we hardly ever actually
have anything in the freelist: only when a relation is dropped, or
something like that, do buffers ever get put to the freelist.  So your
argument that removing a buffer from the freelist is cheaper than running
the clock sweep is largely missing the point.  We'd have to run a clock
sweep in order to find something to put in the freelist.
        regards, tom lane



pgsql-hackers by date:

Previous
From: David G Johnston
Date:
Subject: Re: Perfomance degradation 9.3 (vs 9.2) for FreeBSD
Next
From: Tatsuo Ishii
Date:
Subject: Re: Perfomance degradation 9.3 (vs 9.2) for FreeBSD