Re: lazy vxid locks, v1 - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: lazy vxid locks, v1
Date
Msg-id 8348A657-D387-4A6D-9511-B13EE3321C0D@phlo.org
Whole thread Raw
In response to lazy vxid locks, v1  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Jun12, 2011, at 23:39 , Robert Haas wrote:
> So, the majority (60%) of the excess spinning appears to be due to
> SInvalReadLock.  A good chunk are due to ProcArrayLock (25%).

Hm, sizeof(LWLock) is 24 on X86-64, making sizeof(LWLockPadded) 32.
However, cache lines are 64 bytes large on recent Intel CPUs AFAIK,
so I guess that two adjacent LWLocks currently share one cache line.

Currently, the ProcArrayLock has index 4 while SInvalReadLock has
index 5, so if I'm not mistaken exactly the two locks where you saw
the largest contention on are on the same cache line...

Might make sense to try and see if these numbers change if you
either make LWLockPadded 64bytes or arrange the locks differently...

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Dan Ports
Date:
Subject: Re: Repeated PredicateLockRelation calls during seqscan
Next
From: "Kevin Grittner"
Date:
Subject: Re: Repeated PredicateLockRelation calls during seqscan