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

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Changing types of block and chunk sizes in memory contexts
Дата
Msg-id 20230628234209.imz442z2zyg3lflx@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Changing types of block and chunk sizes in memory contexts  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2023-06-28 17:56:55 -0400, Tom Lane wrote:
> Tomas Vondra <tomas.vondra@enterprisedb.com> writes:
> > ... 4B is tiny compared to what we waste due to the doubling.
> 
> Yeah.  I've occasionally wondered if we should rethink aset.c's
> "only power-of-2 chunk sizes" rule.  Haven't had the bandwidth
> to pursue the idea though.

Me too. It'd not be trivial to do without also incurring performance overhead.

A somewhat easier thing we could try is to carve the "rounding up" space into
smaller chunks, similar to what we do for full blocks. It wouldn't make sense
to do that for the smaller size classes, but above 64-256 bytes or such, I
think the wins might be big enough to outweight the costs?

Of course that doesn't guarantee that that memory in those smaller size
classes is going to be used...

Greetings,

Andres Freund



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Add more sanity checks around callers of changeDependencyFor()
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Another incorrect comment for pg_stat_statements