Re: Process local hint bit cache - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: Process local hint bit cache
Date
Msg-id AANLkTikxgcnD2=Y-ez1+5BpVmHpncUVO_PBfks2k+EAg@mail.gmail.com
Whole thread Raw
In response to Re: Process local hint bit cache  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
On Wed, Mar 30, 2011 at 10:43 AM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Excerpts from Merlin Moncure's message of mié mar 30 12:14:20 -0300 2011:
>
>> It is very different -- the slru layer is in shared memory and
>> requires locks to access.   The entire point is trying to avoid
>> accessing this structure in tight code paths.  I'm actually very
>> skeptical the slru layer provides any benefit at all.  I bet it would
>> be cheaper just mmap in the pages directly (as Heikki is also
>> speculating).
>
> Maybe it would be useful to distinguish the last SLRU page(s) (the one
> where clog writing actually takes place) from the older ones (which only
> ever see reading).  You definitely need locks to be able to access the
> active pages, but all the rest could be held as mmapped and accessed
> without locks because they never change (except to be truncated away).
> You know that any page behind RecentXmin is not going to be written
> anymore, so why go through all the locking hoops?

hm, that's a good thought -- cheap and easy -- and good to implement
irrespective of other changes.  any improvement helps here, although
from my perspective  the largest hobgoblins are shared memory access
generally and the extra i/o.

merlin


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: crash-safe visibility map, take four
Next
From: Steve Crawford
Date:
Subject: Re: [GENERAL] Date conversion using day of week