Re: Improve logging when using Huge Pages
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Andres Freund <andres@anarazel.de>, Michael Paquier <michael@paquier.xyz>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, thomas.munro@gmail.com, tgl@sss.pgh.pa.us, john.naylor@enterprisedb.com, noriyoshi.shinoda@hpe.com, jchampion@timescale.com, sawada.mshk@gmail.com, masao.fujii@oss.nttdata.com, pgsql-hackers@postgresql.org, rjuju123@gmail.com, Nathan Bossart <nathandbossart@gmail.com>
Date: 2023-02-08T23:18:03Z
Lists: pgsql-hackers
Attachments
- v2-0001-add-GUC-huge_pages_active.patch (text/x-diff)
On Thu, Feb 02, 2023 at 04:53:37PM +0100, Alvaro Herrera wrote: > On 2023-Jan-24, Justin Pryzby wrote: > > On Mon, Jan 23, 2023 at 05:33:35PM -0800, Andres Freund wrote: > > > I'm ok with this being a GUC, it doesn't feel elegant, but I suspect there's > > > no realistic elegant answer. > > > Whether it's a GUC or a function, I propose to name it hugepages_active. > > If there's no objections, I'll add to the CF. > > Maybe I misread the code (actually I only read the patch), but -- does > it set active=true when huge_pages=on? I think the code only works when > huge_pages=try. That might be pretty confusing; I think it should say > "on" in both cases. Yes - I realized that too. There's no reason this GUC should be inaccurate when huge_pages=on. (I had hoped there would be a conflict needing resolution before anyone else noticed.) I don't think it makes sense to run postgres -C huge_pages_active, however, so I see no issue that that would always returns "false". If need be, maybe the documentation could say "indicates whether huge pages are active for the running server". Does anybody else want to vote for a function rather than a RUNTIME_COMPUTED GUC ? -- Justin
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add GUC parameter "huge_pages_status"
- a14354cac0e3 17.0 landed
-
Add check on initial and boot values when loading GUCs
- a73952b79563 16.0 cited
-
Clean up some inconsistencies with GUC declarations
- d9d873bac670 16.0 cited
-
Clean up some GUC declarations and comments
- 7d25958453a6 16.0 cited