Re: Changing types of block and chunk sizes in memory contexts

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Changing types of block and chunk sizes in memory contexts
Дата
Msg-id CAApHDvpMSrMu6-C3h+Q5APU7Wv-SJFS5J4LaDjmHEXYBrbN5_g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Changing types of block and chunk sizes in memory contexts  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers
On Thu, 29 Jun 2023 at 09:26, Tomas Vondra
<tomas.vondra@enterprisedb.com> wrote:
> AllocSetContext   224B -> 208B   (4 cachelines)
> GenerationContext 152B -> 136B   (3 cachelines)
> SlabContext       200B -> 200B   (no change, adds 4B hole)
>
> Nothing else changes, AFAICS.

I don't think a lack of a reduction in the number of cache lines is
the important part.  Allowing more space on the keeper block, which is
at the end of the context struct seems more useful. I understand that
the proposal is just to shave off 12 bytes and that's not exactly huge
when it's just once per context, but we do create quite a large number
of contexts with ALLOCSET_SMALL_SIZES which have a 1KB initial block
size.  12 bytes in 1024 is not terrible.

It's not exactly an invasive change.  It does not add any complexity
to the code and as far as I can see, about zero risk of it slowing
anything down.

David



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

Предыдущее
От: Richard Guo
Дата:
Сообщение: Re: Another incorrect comment for pg_stat_statements
Следующее
От: vignesh C
Дата:
Сообщение: Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes