pgsql: snapshot scalability: Move subxact info to ProcGlobal, remove PG

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: snapshot scalability: Move subxact info to ProcGlobal, remove PG
Date: 2020-08-14 22:40:13
Message-ID: E1k6iMv-0001VT-Nf@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

snapshot scalability: Move subxact info to ProcGlobal, remove PGXACT.

Similar to the previous changes this increases the chance that data
frequently needed by GetSnapshotData() stays in l2 cache. In many
workloads subtransactions are very rare, and this makes the check for
that considerably cheaper.

As this removes the last member of PGXACT, there is no need to keep it
around anymore.

On a larger 2 socket machine this and the two preceding commits result
in a ~1.07x performance increase in read-only pgbench. For read-heavy
mixed r/w workloads without row level contention, I see about 1.1x.

Author: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-By: Robert Haas <robertmhaas(at)gmail(dot)com>
Reviewed-By: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Reviewed-By: David Rowley <dgrowleyml(at)gmail(dot)com>
Discussion: https://postgr.es/m/20200301083601.ews6hz5dduc3w2se@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/73487a60fc1063ba4b5178b69aee4ee210c182c4

Modified Files
--------------
src/backend/access/transam/clog.c | 7 +-
src/backend/access/transam/twophase.c | 17 ++---
src/backend/access/transam/varsup.c | 15 +++-
src/backend/storage/ipc/procarray.c | 128 +++++++++++++++++++---------------
src/backend/storage/lmgr/proc.c | 24 ++-----
src/include/storage/proc.h | 34 +++++----
src/tools/pgindent/typedefs.list | 1 -
7 files changed, 113 insertions(+), 113 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-08-15 02:14:35 pgsql: Be more careful about the shape of hashable subplan clauses.
Previous Message Alvaro Herrera 2020-08-14 21:34:34 pgsql: pg_dump: fix dependencies on FKs to partitioned tables