Re: [RFC, POC] Don't require a NBuffer sized PrivateRefCount array of local buffer pins

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [RFC, POC] Don't require a NBuffer sized PrivateRefCount array of local buffer pins
Date: 2014-08-27 14:12:35
Message-ID: 20140827141235.GB7046@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund wrote:
> On 2014-08-26 22:19:47 -0400, Tom Lane wrote:
> > Andres Freund <andres(at)2ndquadrant(dot)com> writes:

> > I would say that the issue most deserving of performance testing is your
> > sizing of the linear-search array --- it's not obvious that 8 is a good
> > size.
>
> It's about the size of a cacheline on all common architectures, that's
> how I found it. I don't think it makes a very big difference whether we
> make it 4 or 12, but outside of that range I think it'll be unlikely to
> be beneficial. The regression tests never go about three or four pins or
> so currently, so I think that's a number unlikely to regularly be
> crossed in practice.

FWIW scanning a minmax index will keep three pages pinned IIRC
(metapage, current revmap page, current regular page).

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2014-08-27 14:13:40 Re: Hardening pg_upgrade
Previous Message Tom Lane 2014-08-27 14:05:57 Re: Optimization for updating foreign tables in Postgres FDW