Re: Estimating HugePages Requirements?
Magnus Hagander <magnus@hagander.net>
From: Magnus Hagander <magnus@hagander.net>
To: Michael Paquier <michael@paquier.xyz>
Cc: "Bossart, Nathan" <bossartn@amazon.com>,
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-27T14:40:27Z
Lists: pgsql-hackers
On Fri, Aug 27, 2021 at 8:46 AM Michael Paquier <michael@paquier.xyz> wrote: > > 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. I would say that can be a disastrous option. First of all it would probably not work if you already have something running -- especially when using huge pages. And if it does work, in that or other scenarios, it can potentially have significant impact on a running cluster to suddenly allocate many GB of more memory... > > 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? I'd say a lot more than just handy. I don't think the workaround is really all that useful. (haven't looked at the actual patch yet, just commenting on the principle) -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/
Commits
-
Silence extra logging when using "postgres -C" on runtime-computed GUCs
- 8bbf8461a3a2 15.0 landed
-
doc: Improve postgres command for shared_memory_size_in_huge_pages
- bbd4951b73ec 15.0 landed
-
Introduce GUC shared_memory_size_in_huge_pages
- 43c1c4f65eab 15.0 landed
-
Support "postgres -C" with runtime-computed GUCs
- 0c39c292077e 15.0 landed
-
Make shared_memory_size a preset option
- 3b231596ccfc 15.0 landed
-
Introduce GUC shared_memory_size
- bd1788051b02 15.0 landed
-
Move the shared memory size calculation to its own function
- 0bd305ee1d42 15.0 landed
-
Add new GUC, max_worker_processes, limiting number of bgworkers.
- 6bc8ef0b7f1f 9.4.0 cited