Re: Shared memory size computation oversight?

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>, Michael Paquier <michael(at)paquier(dot)xyz>, 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-05 06:05:22
Message-ID: 20210305060522.5ogugff254szu5hf@nol
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 04, 2021 at 12:53:54PM -0500, Tom Lane wrote:
> My conclusion is that we don't need to do anything, indeed the proposed
> changes will probably just lead to overestimation.
>
> It's certainly possible that there's something amiss somewhere. These
> numbers were all taken with out-of-the-box configuration, so it could be
> that changing some postgresql.conf entries would expose that some module
> is not scaling its request correctly. Also, I don't have any extensions
> loaded, so this proves nothing about the correctness of any of those.
> But it appears to me that the general scheme is working perfectly fine,
> so we do not need to complicate it.

Thanks for looking at it. I agree that most of the changes aren't worth the
complication and risk to overestimate the shmem size.

But I did some more experiments comparing the current version and the patched
version of the lock and pred lock shared hash table size estimations with some
configuration changes, and I find the following delta in the estimated size:

- original configuration : 15kB
- max_connection = 1000 : 30kB
- max_connection = 1000 and max_locks_per_xact = 256 : 96kB

I don't know if my version is totally wrong or not, but if it's not it could be
worthwhile to apply the hash tab part as it would mean that it doesn't scale
properly.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message tsunakawa.takay@fujitsu.com 2021-03-05 06:17:25 RE: libpq debug log
Previous Message Michael Paquier 2021-03-05 06:00:14 Re: Improvements and additions to COPY progress reporting