Re: pgsql: Avoid SnapshotResetXmin() during AtEOXact_Snapshot()

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Avoid SnapshotResetXmin() during AtEOXact_Snapshot()
Date: 2017-04-06 13:11:35
Message-ID: CA+TgmoZjbFS-A9hErxfQgJYNZ=yege5MVYiJB=HZ4ff8vZTxwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, Apr 6, 2017 at 8:35 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> Avoid SnapshotResetXmin() during AtEOXact_Snapshot()
>
> For normal commits and aborts we already reset PgXact->xmin,
> so we can simply avoid running SnapshotResetXmin() twice.
>
> During performance tests by Alexander Korotkov, diagnosis
> by Andres Freund showed PgXact array as a bottleneck. After
> manual analysis by me of the code paths that touch those
> memory locations, I was able to identify extraneous code
> in the main transaction commit path.
>
> Avoiding touching highly contented shmem improves concurrent
> performance slightly on all workloads, confirmed by tests
> run by Ashutosh Sharma and Alexander Korotkov.
>
> Simon Riggs
>
> Discussion: CANP8+jJdXE9b+b9F8CQT-LuxxO0PBCB-SZFfMVAdp+akqo4zfg(at)mail(dot)gmail(dot)com

Just like the last time you committed this, it seems to have broken
the entire buildfarm.

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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2017-04-06 14:10:17 Re: pgsql: Avoid SnapshotResetXmin() during AtEOXact_Snapshot()
Previous Message Simon Riggs 2017-04-06 12:47:50 Re: [COMMITTERS] pgsql: Collect and use multi-column dependency stats