Move "hot" members of PGPROC into a separate PGXACT array. This speeds up snapshot-taking and reduces ProcArrayLock contention. Also, the PGPROC (and PGXACT) structures used by two-phase commit are now allocated as part of the main array, rather than in a separate array, and we keep ProcArray sorted in pointer order. These changes are intended to minimize the number of cache lines that must be pulled in to take a snapshot, and testing shows a substantial increase in performance on both read and write workloads at high concurrencies.
Pavan Deolasee, Heikki Linnakangas, Robert Haas Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/ed0b409d22346b1b027a4c2099ca66984d94b6dd Modified Files -------------- src/backend/access/transam/twophase.c | 115 ++++++++------ src/backend/access/transam/varsup.c | 11 +- src/backend/access/transam/xact.c | 4 +- src/backend/commands/analyze.c | 4 +- src/backend/commands/vacuum.c | 4 +- src/backend/postmaster/postmaster.c | 3 + src/backend/replication/walsender.c | 2 +- src/backend/storage/ipc/ipci.c | 2 +- src/backend/storage/ipc/procarray.c | 276 ++++++++++++++++++++------------- src/backend/storage/lmgr/deadlock.c | 4 +- src/backend/storage/lmgr/lock.c | 3 +- src/backend/storage/lmgr/proc.c | 87 ++++++++--- src/backend/utils/time/snapmgr.c | 2 +- src/include/storage/proc.h | 47 ++++-- 14 files changed, 356 insertions(+), 208 deletions(-) -- Sent via pgsql-committers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
