Re: Estimating HugePages Requirements?

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: "Bossart, Nathan" <bossartn@amazon.com>
Cc: Andres Freund <andres@anarazel.de>, Mark Dilger <mark.dilger@enterprisedb.com>, Don Seiler <don@seiler.us>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2021-08-27T06:46:35Z
Lists: pgsql-hackers
On Wed, Aug 11, 2021 at 11:23:52PM +0000, Bossart, Nathan wrote:
> I think BootstrapModeMain() makes the most sense.  It fits in nicely
> with the --check logic that's already there.  With v3, the following
> command can be used to retrieve the amount of shared memory required.
> 
>         postgres --output-shmem -D dir
> 
> While testing this new option, I noticed that you can achieve similar
> results today with the following command, although this one will
> actually try to create the shared memory, too.

That may not be the best option.

> IMO the new option is still handy, but I can see the argument that it
> might not be necessary.

A separate option looks handy.  Wouldn't it be better to document it
in postgres-ref.sgml then?
--
Michael

Commits

  1. Silence extra logging when using "postgres -C" on runtime-computed GUCs

  2. doc: Improve postgres command for shared_memory_size_in_huge_pages

  3. Introduce GUC shared_memory_size_in_huge_pages

  4. Support "postgres -C" with runtime-computed GUCs

  5. Make shared_memory_size a preset option

  6. Introduce GUC shared_memory_size

  7. Move the shared memory size calculation to its own function

  8. Add new GUC, max_worker_processes, limiting number of bgworkers.