Re: Page replacement algorithm in buffer cache

From: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Page replacement algorithm in buffer cache
Date: 2013-03-22 11:29:38
Message-ID: CAOeZVifM2-Jq_HJj268F2CLHSQcO8A-Udt_s8VFG2S=9_LniNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 22, 2013 at 4:53 PM, Amit Kapila <amit(dot)kapila(at)huawei(dot)com> wrote:
> On Friday, March 22, 2013 4:36 PM Atri Sharma wrote:
>> >
>> > What would you do if the only young page has usage count zero during
>> second
>> > sweep.
>>
>> Umm....The same approach we take when there is no page with usage
>> count zero in a sweep in the current algorithm?
>
> It would give more priority to young page as compare to more used page.
> I don't know if that would be correct thing to do.

This is my idea, give equal priority to new pages when they enter the
cache, so that they all have an equal chance to be replaced initially.
With time, usage_count shall become the deciding factor in victim
selection.

Regards,

Atri

--
Regards,

Atri
l'apprenant

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2013-03-22 12:06:39 Re: Should commit_delay be PGC_SIGHUP?
Previous Message Amit Kapila 2013-03-22 11:23:41 Re: Page replacement algorithm in buffer cache