Re: Clock sweep not caching enough B-Tree leaf pages?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clock sweep not caching enough B-Tree leaf pages?
Date: 2014-04-18 15:14:58
Message-ID: CA+TgmoZ92CcyVm7oAxL3nnAuOc4g28W+dDGC+pYCCACmnHP_rw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 17, 2014 at 5:00 PM, Greg Stark <stark(at)mit(dot)edu> wrote:
> On Thu, Apr 17, 2014 at 10:18 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> Because all the usage counts are the same, the eviction at
>> this point is completely indiscriminate. We're just as likely to kick
>> out a btree root page or a visibility map page as we are to kick out a
>> random heap page, even though the former have probably been accessed
>> several orders of magnitude more often. That's clearly bad.
>
> That's not clear at all. In that circumstance regardless of what page
> you evict you're incurring precisely one page fault i/o when the page
> is read back in.

I am a bit confused by this remark. In *any* circumstance when you
evict you're incurring precisely one page fault I/O when the page is
read back in. That doesn't mean that the choice of which page to
evict is irrelevant.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-04-18 15:15:34 Re: How can we make beta testing better?
Previous Message Tom Lane 2014-04-18 15:06:21 Re: DISCARD ALL (Again)