Re: Reducing System Allocator Thrashing of ExecutorState to Alleviate FDW-related Performance Degradations

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Reducing System Allocator Thrashing of ExecutorState to Alleviate FDW-related Performance Degradations
Дата
Msg-id 20230220183010.kwasdlkgug6veacd@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Reducing System Allocator Thrashing of ExecutorState to Alleviate FDW-related Performance Degradations  (Andres Freund <andres@anarazel.de>)
Ответы Re: Reducing System Allocator Thrashing of ExecutorState to Alleviate FDW-related Performance Degradations  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-hackers
Hi,

On 2023-02-17 09:52:01 -0800, Andres Freund wrote:
> On 2023-02-17 17:26:20 +1300, David Rowley wrote:
> Random note:
>
> I wonder if we should having a bitmap (in an int) in front of aset's
> freelist. In a lot of cases we incur plenty cache misses, just to find the
> freelist bucket empty.

Two somewhat related thoughts:

1) We should move AllocBlockData->freeptr into AllocSetContext. It's only ever
   used for the block at the head of ->blocks.

   We completely unnecessarily incur more cache line misses due to this (and
   waste a tiny bit of space).

2) We should introduce an API mcxt.c API to perform allocations that the
   caller promises not to individually free.  We've talked a bunch about
   introducing a bump allocator memory context, but that requires using
   dedicated memory contexts, which incurs noticable space overhead, whereas
   just having a separate function call for the existing memory contexts
   doesn't have that issue.

   For aset.c we should just allocate from set->freeptr, without going through
   the freelist. Obviously we'd not round up to a power of 2. And likely, at
   least outside of assert builds, we should not have a chunk header.


Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Geier
Дата:
Сообщение: Re: Performance issues with parallelism and LIMIT
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: meson: Optionally disable installation of test modules