Re: Estimating HugePages Requirements?
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Magnus Hagander <magnus@hagander.net>
Cc: Nathan Bossart <nathandbossart@gmail.com>, "Bossart, Nathan" <bossartn@amazon.com>, Fujii Masao <masao.fujii@oss.nttdata.com>, Justin Pryzby <pryzby@telsasoft.com>, Andres Freund <andres@anarazel.de>, Mark Dilger <mark.dilger@enterprisedb.com>, Don Seiler <don@seiler.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2022-04-25T00:15:28Z
Lists: pgsql-hackers
On Fri, Apr 22, 2022 at 09:49:34AM +0200, Magnus Hagander wrote: > I agree that thats a very narrow use case. And I'm not sure the use case of > a running server is even that important here - it's really the offline one > that's important. Or rather, the really compelling one is when there is a > server running but I want to check the value offline because it will > change. SHOW doesn't help there because it shows the value based on the > currently running configuration, not the new one after a restart. You mean the case of a server where one would directly change postgresql.conf on a running server, and use postgres -C to see how much the kernel settings need to be changed before the restart? > Hmm. So what's the solution on windows? I guess maybe it's not as important > there because there is no limit on huge pages, but generally getting the > expected shared memory usage might be useful? Just significantly less > important. Contrary to Linux, we don't need to care about the number of large pages that are necessary because there is no equivalent of vm.nr_hugepages on Windows (see [1]), do we? If that were the case, we'd have a use case for huge_page_size, additionally. That's the case where shared_memory_size_in_huge_pages comes in handy, as much as does huge_page_size, and note that shared_memory_size works on WIN32. [1]: https://docs.microsoft.com/en-us/windows/win32/memory/large-page-support -- Michael
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