Re: lazy vxid locks, v1

Поиск
Список
Период
Сортировка
От Florian Pflug
Тема Re: lazy vxid locks, v1
Дата
Msg-id 8348A657-D387-4A6D-9511-B13EE3321C0D@phlo.org
обсуждение исходный текст
Ответ на lazy vxid locks, v1  (Robert Haas <robertmhaas@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Dan Ports
Дата:
Сообщение: Re: Repeated PredicateLockRelation calls during seqscan
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Repeated PredicateLockRelation calls during seqscan