Re: Reasoning behind LWLOCK_PADDED_SIZE/increase it to a full cacheline
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Reasoning behind LWLOCK_PADDED_SIZE/increase it to a full cacheline |
| Дата | |
| Msg-id | 5840.1380019179@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Reasoning behind LWLOCK_PADDED_SIZE/increase it to a full cacheline (Andres Freund <andres@2ndquadrant.com>) |
| Ответы |
Re: Reasoning behind LWLOCK_PADDED_SIZE/increase it to a
full cacheline
|
| Список | pgsql-hackers |
Andres Freund <andres@2ndquadrant.com> writes:
> So, what we do is we guarantee that LWLocks are aligned to 16 or 32byte
> boundaries. That means that on x86-64 (64byte cachelines, 24bytes
> unpadded lwlock) two lwlocks share a cacheline.
Yup.
> In my benchmarks changing the padding to 64byte increases performance in
> workloads with contended lwlocks considerably.
At a huge cost in RAM. Remember we make two LWLocks per shared buffer.
I think that rather than using a blunt instrument like that, we ought to
see if we can identify pairs of hot LWLocks and make sure they're not
adjacent.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера