pgsql: Keep heavily-contended fields in XLogCtlInsert on different cach

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Keep heavily-contended fields in XLogCtlInsert on different cach
Date: 2013-09-04 20:25:20
Message-ID: E1VHJdg-0008SG-40@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Keep heavily-contended fields in XLogCtlInsert on different cache lines.

Performance testing shows that if the insertpos_lck spinlock and the fields
that it protects are on the same cache line with other variables that are
frequently accessed, the false sharing can hurt performance a lot. Keep
them apart by adding some padding.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/375d8526f2900d0c377f44532f6d09ee06531f67

Modified Files
--------------
src/backend/access/transam/xlog.c | 15 ++++++++++++---
src/include/pg_config_manual.h | 11 +++++++++++
2 files changed, 23 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2013-09-04 21:05:01 pgsql: Remove dead URL mention in OSX startup script
Previous Message Robert Haas 2013-09-04 15:47:06 pgsql: Expose fsync_fname as a public API.