Re: Proposal for CSN based snapshots

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Greg Stark <stark(at)mit(dot)edu>, Robert Haas <robertmhaas(at)gmail(dot)com>, "Andres Freund" <andres(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>, Ants Aasma <ants(at)cybertec(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Markus Wanner <markus(at)bluegap(dot)ch>
Subject: Re: Proposal for CSN based snapshots
Date: 2014-08-27 06:40:37
Message-ID: 53FD7D65.9040602@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/27/2014 08:23 AM, Jeff Davis wrote:
> On Tue, 2014-08-26 at 13:45 +0300, Heikki Linnakangas wrote:
>> Yeah. This patch in the current state is likely much much slower than
>> unpatched master, except in extreme cases where you have thousands of
>> connections and short transactions so that without the patch, you spend
>> most of the time acquiring snapshots.
>
> What else are you looking to accomplish with this patch during this
> 'fest? Bug finding? Design review? Performance testing?

Design review, mostly. I know the performance still sucks. Although if
you can foresee some performance problems, aside from the extra CSNLOG
lookups, it would be good to know.

> I think there's already at least one design issue to consider, which is
> whether we care about CLOG/CSNLOG access for hinted records where the
> xid > snapshot->xmin (that is, accesses that previously would have
> looked at xip). Would more discussion help here or do we need to wait
> for performance numbers?

I think my current plan is to try to make that CSNLOG lookup fast. In
essence, rewrite SLRUs to be more performant. That would help with the
current clog, too, which would make it more feasible to set hint bits
less often. In particular, avoid dirtying pages just to set hint bits.
I'm not sure if that's enough - you can't beat checking a single hint
bit in the same cache line as the XID - but I think it's worth a try.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-08-27 06:41:20 Re: REINDEX CONCURRENTLY 2.0
Previous Message Andres Freund 2014-08-27 06:38:35 Re: [RFC, POC] Don't require a NBuffer sized PrivateRefCount array of local buffer pins