From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Georgios <gkokolatos(at)protonmail(dot)com>, Julien Rouhaud <julien(dot)rouhaud(at)free(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "robertmhaas(at)gmail(dot)com" <robertmhaas(at)gmail(dot)com> |
Subject: | Re: Shared memory size computation oversight? |
Date: | 2021-03-03 16:40:52 |
Message-ID: | 20210303164052.f336wina7qpchabd@nol |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 03, 2021 at 11:23:54AM -0500, Tom Lane wrote:
> Georgios <gkokolatos(at)protonmail(dot)com> writes:
> > My limited understanding is also based in a comment in CreateSharedMemoryAndSemaphores()
>
> > * Size of the Postgres shared-memory block is estimated via
> > * moderately-accurate estimates for the big hogs, plus 100K for the
> > * stuff that's too small to bother with estimating.
>
> Right. That 100K slop factor is capable of hiding a multitude of sins.
>
> I have not looked at this patch, but I think the concern is basically that
> if we have space-estimation infrastructure that misestimates what it is
> supposed to estimate, then if that infrastructure is used to estimate the
> size of any of the "big hog" data structures, we might misestimate by
> enough that the slop factor wouldn't hide it.
Exactly. And now that I looked deeper I can see that multiple estimates are
entirely ignoring the padding alignment (e.g. ProcGlobalShmemSize()), which can
exceed the 6kB originally estimated by Robert.
From | Date | Subject | |
---|---|---|---|
Next Message | John Naylor | 2021-03-03 16:41:11 | our use of popcount |
Previous Message | Julien Rouhaud | 2021-03-03 16:36:08 | Re: Shared memory size computation oversight? |