Re: Estimating HugePages Requirements?
Nathan Bossart <bossartn@amazon.com>
From: "Bossart, Nathan" <bossartn@amazon.com>
To: Magnus Hagander <magnus@hagander.net>, Michael Paquier <michael@paquier.xyz>
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-27T18:16:01Z
Lists: pgsql-hackers
Attachments
- v4-0001-introduce-option-for-retreiving-shmem-size.patch (application/octet-stream) patch v4-0001
On 8/27/21, 7:41 AM, "Magnus Hagander" <magnus@hagander.net> wrote: > 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: >> > 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... The v3 patch actually didn't work if the server was already running. I removed that restriction in v4. >> > 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. I added some documentation in v4. Nathan
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