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

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Changing types of block and chunk sizes in memory contexts
Date: 2023-06-28 23:42:09
Message-ID: 20230628234209.imz442z2zyg3lflx@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-06-28 17:56:55 -0400, Tom Lane wrote:
> Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-06-29 00:19:15 Re: Another incorrect comment for pg_stat_statements
Previous Message Michael Paquier 2023-06-28 23:36:30 Add more sanity checks around callers of changeDependencyFor()