Re: [HACKERS] Clock with Adaptive Replacement

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Юрий Соколов <funny(dot)falcon(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Stephen Frost <sfrost(at)snowman(dot)net>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Clock with Adaptive Replacement
Date: 2018-05-09 18:55:04
Message-ID: CA+TgmoZprpS50PMUC3JmXqvST6c_u+EDKmkncjrkkq1z4ozUBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 9, 2018 at 1:37 PM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
> On Wed, May 9, 2018 at 11:00 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> Independently of that, it would be probably also useful to avoid
>> bumping the reference count multiple times when a buffer is accessed
>> by the same backend several times in quick succession. Perhaps this
>> could even be as simple as maintaining a list of the last two buffer
>> IDs for which we bumped the usage count; if we see one of them again,
>> don't bump the usage count again.
>
> Hm. Is the objective here to optimize access patterns or to reduce atomic
> operations (or both)? All else being equal, an algorithm that delivers
> the similar eviction results with less cache synchronization ought to be
> preferred...are the various algorithms scored in that way?

The CAR paper explains steps they've taken to minimize atomic
operations, so it is something that people do think about.

The main reason for wanting to avoid extra usage count bumps is to
avoid distorting the usage counts. Any savings we get from reducing
atomic ops is a bonus.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-05-09 19:08:29 Re: [HACKERS] Parallel Append implementation
Previous Message Merlin Moncure 2018-05-09 17:37:48 Re: [HACKERS] Clock with Adaptive Replacement