Re: [HACKERS] Clock with Adaptive Replacement - Mailing list pgsql-hackers

From Yura Sokolov
Subject Re: [HACKERS] Clock with Adaptive Replacement
Date
Msg-id 814a70dd-73fa-21ba-e5f5-1f34ab2eac31@gmail.com
Whole thread Raw
In response to Re: [HACKERS] Clock with Adaptive Replacement  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
02.05.2018 01:37, Peter Geoghegan пишет:
> On Tue, May 1, 2018 at 11:58 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> I agree that double-counting correlated accesses is a a problem, and I
>> agree that we probably want to do something about it.  I am skeptical
>> that using wall-clock time is the right way to solve that problem
>> because it leads to edge effects
> 
> I agree that wall-clock time is a bad approach, actually. If we were
> to use wall-clock time, we'd only do so because it can be used to
> discriminate against a thing that we actually care about in an
> approximate, indirect way. If there is a more direct way of
> identifying correlated accesses, which I gather that there is, then we
> should probably use it.

I suggest incrementing only once in 1/32 replacements in shared_buffers.
I.e. if size of shared_buffers is 1024, and this page were put into
shared_buffers as 21200, then next time its usage count will be
incremented only after 21232 page were put into shared buffers. And
second time only after 21264 page.

regards,
Yura.


pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Oddity in tuple routing for foreign partitions
Next
From: Adrien Nayrat
Date:
Subject: Re: Explain buffers wrong counter with parallel plans