Re: Lock contention (was Re: [PATCHES] update i386 - Mailing list pgsql-hackers

From Neil Conway
Subject Re: Lock contention (was Re: [PATCHES] update i386
Date
Msg-id m2y8so6w2s.fsf@mailbox.samurai.com
Whole thread Raw
In response to Lock contention (was Re: [PATCHES] update i386 spinlock for hyperthreading)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:
> LRU etc have nothing to do with this.  The majority of trips into the
> buffer manager are for ReadBuffer/ReleaseBuffer.  What we need is to
> figure a way for those operations to use finer-grain locks so they don't
> contend so much.

I reimplemented much of bufmgr.c over the holidays, with the goal of
reducing the contention for the BufMgrLock as well as fixing some
other less important problems. Where possible, operations that only
effect the state of a single buffer now only need to acquire a
per-buffer "meta data lock". I haven't done any benchmarking yet, but
this should hopefully improve concurrent performance. The patch isn't
quite finished yet, but I'll post it to the list in a few days once
I've had a chance to wrap up a few loose ends.

-Neil



pgsql-hackers by date:

Previous
From: A E
Date:
Subject: Repost of Functions Returning Record Datatype
Next
From: Mark Kirkwood
Date:
Subject: Re: psql \d option list overloaded