Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mLyH5-00054v-Hp for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Sep 2021 01:45:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mLyH3-0008P1-2U for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Sep 2021 01:45:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mLyH2-0008MY-Am for pgsql-hackers@lists.postgresql.org; Fri, 03 Sep 2021 01:45:44 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mLyH0-0003I8-9b for pgsql-hackers@postgresql.org; Fri, 03 Sep 2021 01:45:44 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 97A095C01A3; Thu, 2 Sep 2021 21:45:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 02 Sep 2021 21:45:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=vokqFnbSkwt/iLLRtG4SZ58PxT+ CRWp86qcb1FI5SBE=; b=urYEBrLfTpvxeMKsonHz+j6MUFZv+nDFZrE+xW+eFoa qNVTS2T6KeDLlseBnn1/37LjLIsA5B1tbMb9iEEoqtuCx+Y+3ICie1YWPDEPUAEF f8k5UjUMikqoysKxVVSW73vNJqQPoQugyQZV1U/N0eCnrVO31ET79rEtrMzvmNuC z4fUFWgDWYV+vTXXtNByQ5p/z2A6vSKr00eGY5DkgB0ZvCT18PDiRjMsA/sQeMGl gRxlIYiQu80gzinF0O+pv4SNIVSmDjEqE+fMaCDEIutpKv26PjcfrOf/lsAWmrR2 Bx86isGhVm+YlhKzEwD+oufv3MXEVWtZZNB+zw2pJCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=vokqFn bSkwt/iLLRtG4SZ58PxT+CRWp86qcb1FI5SBE=; b=AK5RMM8BezgKa12IFcaQ7G LYKmAiFY817B/Grc2uFyLKiW0GpmnMSQ/Wlp/aielsKYOwBqUvU3E2wd/rHRcBzi m5SpTnk3obXe8m5AHWgz7cz9NS3zBAkmzNguMApVpB7GsehRfeVflE0UPWf2OgSC v6fY8NP5ic5urG9kwEVSu4n7V956w78zmH1in92AlQAtI1IFFNeYqrIsldT1wmKg EKUabav+EXSY+6McU/zRdtiC6AO044Q8S6qYZkBvZ74WX87Ep+c6zhsfZVauYThZ kg1pUIycIiY3z08vgQZ7AfqCk2+OSE+aD8kDsdH4jUS64PG2fne9YszpTjIJYg/w == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddviedghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Sep 2021 21:45:37 -0400 (EDT) Date: Fri, 3 Sep 2021 10:45:33 +0900 From: Michael Paquier To: "Bossart, Nathan" Cc: Justin Pryzby , Andres Freund , Magnus Hagander , Mark Dilger , Don Seiler , "pgsql-hackers@postgresql.org" Subject: Re: Estimating HugePages Requirements? Message-ID: References: <0D1645F3-ADFD-4B2F-9F34-961BDFBB881B@amazon.com> <20210828035722.GQ26465@telsasoft.com> <82E1E183-691F-479E-B661-9BE8EC70BD21@amazon.com> <48795AC4-289F-4CDE-88F5-4FD1ED2BD3DD@amazon.com> <298B6D88-7B71-4E1B-BFC4-E7BF3A32960D@amazon.com> <23F67FC0-E432-4324-BEA4-F99B126510EA@amazon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="T5y9rNg6J5Q9hZaa" Content-Disposition: inline In-Reply-To: <23F67FC0-E432-4324-BEA4-F99B126510EA@amazon.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --T5y9rNg6J5Q9hZaa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 02, 2021 at 04:46:56PM +0000, Bossart, Nathan wrote: > Yeah, huge_pages_required might not serve much purpose for Windows. > We could always set it to -1 for Windows if it seems like it'll do > more harm than good. I'd be fine with this setup on environments where there is no need for it. >> At the end it would be nice to not finish with two GUCs. Both depend >> on the reordering of the actions done by the postmaster, so I'd be >> curious to hear the thoughts of others on this particular point. >=20 > Of course. It'd be great to hear others' thoughts on this stuff. Just to be clear here, the ordering of HEAD is that for the postmaster: - Load configuration. - Handle -C config_param. - checkDataDir(), to check permissions of the data dir, etc. - checkControlFile(), to see if the control file exists. - Switch to data directory as work dir. - Lock file creation. - Initial read of the control file (where the GUC data_checksums is set). - Register apply launcher - shared_preload_libraries With 0002, we have that: - Load configuration. - checkDataDir(), to check permissions of the data dir, etc. - checkControlFile(), to see if the control file exists. - Switch to data directory as work dir. - Register apply launcher - shared_preload_libraries - Calculate the shmem GUCs (new step) - Handle -C config_param. - Lock file creation. - Initial read of the control file (where the GUC data_checksums is set). One thing that would be incorrect upon more review is that we'd still have data_checksums wrong with -C, meaning that the initial read of the control file should be moved further up, and getting the control file checks done before registering workers would be better. Keeping the lock file at the end would be fine AFAIK, but should we worry about the interactions with _PG_init() here? 0001, that refactors the calculation of the shmem size into a different routine, is fine as-is, so I'd like to move on and apply it. -- Michael --T5y9rNg6J5Q9hZaa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmExfj0ACgkQnvQgOdby QH3O5w/+KO1tiJzz5R3nkzTDfGUoJn1vmOjkrSMxYEAygnYfhupnR5HZk5DwH7YQ qVVmQ0CrWulPRanyrhhWnQaky/8vTszXyKlvgqDn7CtNOHqDXjw9Ck2wAa9qwtHv I75uT3tIh3GC9/IjFcbtd609Y/Q/s285Xs2fxpaRqPxwqwANxBW1GDLsuGg54Fhr /UrGA2HtlJ/6Ie78SOG7dD4kp4fd50ecDpP8bodH3PaS0qoy+KBqkxX/BuvB91T+ 6CKN/WptbglAFdTBF5w2gO2RbmJUav2hTIDkupWANo519AM8HdWcPZk6owgrTBGG 4Gtct2795hgYq3BRSz9bRVdVi+fmyVYmHmMzPBcP547wLCMyfFt35P7lq2aAB2Ru F9Tpun/heRwq6sUiR4omgrlKARDOXovGHexnlz/OzjS4CUAiAEY+pB7wPA/WeSPU gEO8NMkjt0D/VXkV6K3oHQjssBeyIp3z5hx+5DTdnZ3ADDLRwyFbEu+MbDUys9X3 APff5RYrYn5CZOcBt68uBbs2ZSGS4iZjohajKBZpdZekwEvWutZJKHfUOdTkwNzy Q1zMOC897t9/pN5Ttbdc+um6wzgPOY11G0mPPIx9XIDphFHMR6+UElNXiuG/aXw6 7xOgk0HpdOCXDkzeAIw2a1qJVdmrEe0TBGcE4G24XGB83YuyVeo= =JdLH -----END PGP SIGNATURE----- --T5y9rNg6J5Q9hZaa--