pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: snapshot scalability: Move delayChkpt from PGXACT to PGPROC.
Date: Wed, 08 Apr 2020 00:36:57 +0000
Message-ID: <E1jLyi9-0002bX-4I@gemulon.postgresql.org> (raw)

snapshot scalability: Move delayChkpt from PGXACT to PGPROC.

The goal of separating hotly accessed per-backend data from PGPROC
into PGXACT is to make accesses fast (GetSnapshotData() in
particular). But delayChkpt is not actually accessed frequently; only
when starting a checkpoint. As it is frequently modified (multiple
times in the course of a single transaction), storing it in the same
cacheline as hotly accessed data unnecessarily dirties a contended
cacheline.

Therefore move delayChkpt to PGPROC.

This is part of a larger series of patches intending to improve
GetSnapshotData() scalability. It is committed and pushed separately,
as it is independently beneficial (small but measurable win, limited
by the other frequent modifications of PGXACT).

Author: Andres Freund
Reviewed-By: Robert Haas, Thomas Munro, David Rowley
Discussion: https://postgr.es/m/20200301083601.ews6hz5dduc3w2se@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/75848bc74411130ede23995d0ab1aefb12c4c4b0

Modified Files
--------------
src/backend/access/transam/multixact.c  |  6 +++---
src/backend/access/transam/twophase.c   | 10 +++++-----
src/backend/access/transam/xact.c       |  4 ++--
src/backend/access/transam/xloginsert.c |  2 +-
src/backend/storage/buffer/bufmgr.c     |  4 ++--
src/backend/storage/ipc/procarray.c     | 14 ++++++--------
src/backend/storage/lmgr/proc.c         |  4 ++--
src/include/storage/proc.h              |  4 ++--
8 files changed, 23 insertions(+), 25 deletions(-)



Message-ID: <E1jLyi9-0002bX-4I@gemulon.postgresql.org>
Permalink:  ../E1jLyi9-0002bX-4I@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jLyi9-0002bX-4I@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: snapshot scalability: Move delayChkpt from PGXACT to PGPROC.
  In-Reply-To: <E1jLyi9-0002bX-4I@gemulon.postgresql.org>
  References: <E1jLyi9-0002bX-4I@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox