Re: Changing types of block and chunk sizes in memory contexts - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Changing types of block and chunk sizes in memory contexts
Date
Msg-id 20230628234209.imz442z2zyg3lflx@awork3.anarazel.de
Whole thread Raw
In response to Re: Changing types of block and chunk sizes in memory contexts  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Michael Paquier
Date:
Subject: Add more sanity checks around callers of changeDependencyFor()
Next
From: Michael Paquier
Date:
Subject: Re: Another incorrect comment for pg_stat_statements