Replace the BufMgrLock with separate locks on the lookup hashtable and
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 4 Mar 2005 20:21:07 +0000 (20:21 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 4 Mar 2005 20:21:07 +0000 (20:21 +0000)
commit5d5087363d7cdbd00fc432a1216e83a00f7139bd
tree56492be3beb9be188f37bfa68c9bfc0e35b0961c
parent5592a6cf46d60187b6f4895d2144e67d4f54fa25
Replace the BufMgrLock with separate locks on the lookup hashtable and
the freelist, plus per-buffer spinlocks that protect access to individual
shared buffer headers.  This requires abandoning a global freelist (since
the freelist is a global contention point), which shoots down ARC and 2Q
as well as plain LRU management.  Adopt a clock sweep algorithm instead.
Preliminary results show substantial improvement in multi-backend situations.
18 files changed:
doc/src/sgml/runtime.sgml
src/backend/catalog/index.c
src/backend/commands/dbcommands.c
src/backend/commands/vacuum.c
src/backend/postmaster/bgwriter.c
src/backend/storage/buffer/README
src/backend/storage/buffer/buf_init.c
src/backend/storage/buffer/buf_table.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/freelist.c
src/backend/storage/buffer/localbuf.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/backend/utils/resowner/resowner.c
src/include/postmaster/bgwriter.h
src/include/storage/buf_internals.h
src/include/storage/bufmgr.h
src/include/storage/lwlock.h