Re: Reducing the chunk header sizes on all memory context types - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Reducing the chunk header sizes on all memory context types
Date
Msg-id 20220712174404.polbc5it7j6mzmql@awork3.anarazel.de
Whole thread Raw
In response to Re: Reducing the chunk header sizes on all memory context types  (Yura Sokolov <y.sokolov@postgrespro.ru>)
Responses Re: Reducing the chunk header sizes on all memory context types
List pgsql-hackers
Hi,

On 2022-07-12 20:22:57 +0300, Yura Sokolov wrote:
> I don't get, why "large chunk" needs additional fields for size and
> offset.
> Large allocation sizes are certainly rounded to page size.
> And allocations which doesn't fit 1GB we could easily round to 1MB.
> Then we could simply store `size>>20`.
> It will limit MaxAllocHugeSize to `(1<<(30+20))-1` - 1PB. Doubdfully we
> will deal with such huge allocations in near future.

What would gain by doing something like this? The storage density loss of
storing an exact size is smaller than what you propose here.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Reducing the chunk header sizes on all memory context types
Next
From: Tom Lane
Date:
Subject: Re: Cleaning up historical portability baggage