Skip site navigation (1) Skip section navigation (2)

Re: LWLock cache line alignment

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: LWLock cache line alignment
Date: 2005-02-03 14:31:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> It looks like padding out LWLock struct would ensure that each of those
> were in separate cache lines?

I've looked at this before and I think it's a nonstarter; increasing the
size of a spinlock to 128 bytes is just not reasonable.  (Remember there
are two per buffer.)  Also, there's no evidence it would actually help
anything, because the contention we have been able to measure is on only
one particular lock (BufMgrLock) anyway.  But feel free to try it to see
if you can see a difference.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2005-02-03 14:32:52
Subject: Re: LWLockRelease
Previous:From: Simon RiggsDate: 2005-02-03 14:26:16
Subject: Re: LWLock cache line alignment

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group