Keep heavily-contended fields in XLogCtlInsert on different cache lines.
Heikki Linnakangas <heikki.linnakangas@iki.fi>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlog.c | modified | +12 −3 |
| src/include/pg_config_manual.h | modified | +11 −0 |