[COMMITTERS] pgsql: Avoid SnapshotResetXmin() during AtEOXact_Snapshot()
[COMMITTERS] pgsql: Avoid SnapshotResetXmin() during AtEOXact_Snapshot()
От:
Simon Riggs <simon@2ndQuadrant.com>
Дата:
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@mail.gmail.com Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/6bad580d9e678a0b604883e14d8401d469b06566 Modified Files -------------- src/backend/access/transam/xact.c | 6 +++--- src/backend/utils/time/snapmgr.c | 14 ++++++++++++-- src/include/utils/snapmgr.h | 2 +- 3 files changed, 16 insertions(+), 6 deletions(-)
Re: [COMMITTERS] pgsql: Avoid SnapshotResetXmin() during AtEOXact_Snapshot()
От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Thu, Apr 6, 2017 at 8:35 AM, Simon Riggs 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@mail.gmail.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
Re: [COMMITTERS] pgsql: Avoid SnapshotResetXmin() during AtEOXact_Snapshot()
От:
Simon Riggs <simon@2ndquadrant.com>
Дата:
On 6 April 2017 at 09:11, Robert Haas wrote: > Just like the last time you committed this, it seems to have broken > the entire buildfarm. For different reasons, AFAIU. Investigating already. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services