As discussed on -hackers: Patch to test performance for lwlock structure padding for 8.1beta
This patch is only expected to show improvement on larger SMP systems where there is considerable lwlock activity, on related lock types e.g. multiple backends doing tight nested loop joins at the same time as lots of cache misses Cost: 6x 100 bytes of memory on to each backend Based on recommendations from CPU hardware optimization guides and one previously successful test of DBT-2/TPC-C. For testing only, at this stage. Best Regards, Simon Riggs
Index: src/include/storage/lwlock.h =================================================================== RCS file: /projects/cvsroot/pgsql/src/include/storage/lwlock.h,v retrieving revision 1.22 diff -c -c -r1.22 lwlock.h *** src/include/storage/lwlock.h 20 Aug 2005 23:26:34 -0000 1.22 --- src/include/storage/lwlock.h 12 Oct 2005 19:47:19 -0000 *************** *** 25,41 **** */ typedef enum LWLockId { ! BufMappingLock, ! BufFreelistLock, ! LockMgrLock, ! OidGenLock, ! XidGenLock, ! ProcArrayLock, ! SInvalLock, ! FreeSpaceLock, ! WALInsertLock, ! WALWriteLock, ! ControlFileLock, CheckpointLock, CheckpointStartLock, CLogControlLock, --- 25,83 ---- */ typedef enum LWLockId { ! BufMappingLock, ! BufMappingLock_Padding1, ! BufMappingLock_Padding2, ! BufMappingLock_Padding3, ! BufMappingLock_Padding4, ! BufMappingLock_Padding5, ! BufMappingLock_Padding6, ! BufMappingLock_Padding7, ! BufFreelistLock, ! BufFreelistLock_Padding1, ! BufFreelistLock_Padding2, ! BufFreelistLock_Padding3, ! BufFreelistLock_Padding4, ! BufFreelistLock_Padding5, ! BufFreelistLock_Padding6, ! BufFreelistLock_Padding7, ! LockMgrLock, ! LockMgrLock_Padding1, ! LockMgrLock_Padding2, ! LockMgrLock_Padding3, ! LockMgrLock_Padding4, ! LockMgrLock_Padding5, ! LockMgrLock_Padding6, ! LockMgrLock_Padding7, ! OidGenLock, ! XidGenLock, ! ProcArrayLock, ! SInvalLock, ! FreeSpaceLock, ! FreeSpaceLock_Padding1, ! FreeSpaceLock_Padding2, ! FreeSpaceLock_Padding3, ! FreeSpaceLock_Padding4, ! FreeSpaceLock_Padding5, ! FreeSpaceLock_Padding6, ! FreeSpaceLock_Padding7, ! WALInsertLock, ! WALInsertLock_Padding1, ! WALInsertLock_Padding2, ! WALInsertLock_Padding3, ! WALInsertLock_Padding4, ! WALInsertLock_Padding5, ! WALInsertLock_Padding6, ! WALInsertLock_Padding7, ! WALWriteLock, ! WALWriteLock_Padding1, ! WALWriteLock_Padding2, ! WALWriteLock_Padding3, ! WALWriteLock_Padding4, ! WALWriteLock_Padding5, ! WALWriteLock_Padding6, ! WALWriteLock_Padding7, ! ControlFileLock, CheckpointLock, CheckpointStartLock, CLogControlLock,
---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings