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 1mJne0-0001Au-CK for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Aug 2021 02:00:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mJndy-0003cj-5B for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Aug 2021 02:00:26 +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 1mJndx-0003ca-TY for pgsql-hackers@lists.postgresql.org; Sat, 28 Aug 2021 02:00:25 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJnds-00074u-IY for pgsql-hackers@postgresql.org; Sat, 28 Aug 2021 02:00:25 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id DC4615C0035; Fri, 27 Aug 2021 22:00:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 27 Aug 2021 22:00:18 -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=67SgBa66AoxR/z3b0gwnm35Cilw kQJkdBymcjwH6G5I=; b=nQTMWZR1ZahSsaRDKj11cMxTBnsceKazyuRERDDlDD5 lof5lWL2JGWFx30X1demCzhEH3g4UEoqV8/1+OatPuXv2xKs4+VAttuskueGUS9D +Bs7n8DnGtdwEOZOuU2LRBLPaU+mBTxhCw3pXTMKxByCmp8VCYQ1Q5lcTKNJ5yl6 5AG+sMnMwMI4M8+MMQYi06cXPVxARWcT4GIysbLbvlJ5LsBc7UuWWilBAiPFOdZu iWjtj0G/fgEJcORM0oLkjnkdY/G3xUyn2BWN1wV4iU1AnkyPgwgh3QBE1xLGA9f3 a3XlpkRtyZkmz6o0HgmJ2MW9FEbn6cec/lrpm0uB6gw== 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=67SgBa 66AoxR/z3b0gwnm35CilwkQJkdBymcjwH6G5I=; b=KVRJjqPNPG9UGqniLXRXTc fdFhTTk7VlvrMEmfDf87MvPryeRPlAv2ORVb+vL0LF/RKutbI4CWU4udWAHZ7Y7R CoeMduG5JScNy4lFVBbs5PgNa3HE+gezripCaQVJwgbFh6jVQaOPQUKgzPNzWXSY ay9t0IR4gm4zCsTsubHtYznDotlsedorDOxuJNGmfQE/pVYffUDKJFipiJKQHA5x 23jn3dV/OwIbytvMvqoy/OxX1SgLGA0U3/ulprPUH1scm4JeubBV7fad6IgZk58S s6Td5ux4l7t9x/CaC6zXRbOGjqqiLyKNJhzLFFQvsvBjN/4XcE6Sff80pADw+uRw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddugedghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Aug 2021 22:00:15 -0400 (EDT) Date: Sat, 28 Aug 2021 11:00:11 +0900 From: Michael Paquier To: "Bossart, Nathan" Cc: Andres Freund , Magnus Hagander , Mark Dilger , Don Seiler , "pgsql-hackers@postgresql.org" Subject: Re: Estimating HugePages Requirements? Message-ID: References: <73A4E25F-1039-4FC9-8E6E-0A00230BDFB8@enterprisedb.com> <92BB93C3-1AA8-4548-96F7-062C4AF09182@amazon.com> <20210810034205.r72j5uouynepj4f2@alap3.anarazel.de> <0545F7B3-70C0-4DE8-8C85-EAFE6113B7EE@amazon.com> <20210827184648.d3jbv73pgyccqwkz@alap3.anarazel.de> <071DC95B-4CA8-4D2B-BD24-1A66B3EFFE28@amazon.com> <20210827193813.oqo5lamvyzahs35o@alap3.anarazel.de> <0D1645F3-ADFD-4B2F-9F34-961BDFBB881B@amazon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+3g2ABFDKnnRiK3d" Content-Disposition: inline In-Reply-To: <0D1645F3-ADFD-4B2F-9F34-961BDFBB881B@amazon.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --+3g2ABFDKnnRiK3d Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 27, 2021 at 08:16:40PM +0000, Bossart, Nathan wrote: > On 8/27/21, 12:39 PM, "Andres Freund" wrote: >> One thing I wonder is if this wouldn't better be dealt with in a more ge= neric >> way. While this is the most problematic runtime computed GUC, it's not t= he >> only one. What if we introduced a new shared_memory_size GUC, and made >> --describe-config output it? Perhaps adding --describe-config=3Dguc-name? >> >> I also wonder if we should output the number of hugepages needed instead= of >> the "raw" bytes of shared memory. The whole business about figuring out = the >> huge page size, dividing the shared memory size by that and then roundin= g up >> could be removed in that case. Due to huge_page_size it's not even immed= iately >> obvious which huge page size one should use... >=20 > I like both of these ideas. That pretty much looks like -C in concept, isn't it? Except that you cannot get the actual total shared memory value because we'd do this operation before loading shared_preload_libraries and miss any amount asked by extensions. There is a problem similar when attempting to do postgres -C data_checksums, for example, which would output an incorrect value even if the cluster has data checksums enabled. -- Michael --+3g2ABFDKnnRiK3d Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmEpmKsACgkQnvQgOdby QH3ITQ/+PaQGNmp8gNmf+0Hor11EzdAfPhxe3fM6M1r2HaoK1925bJWK8wvquA9d FCiS5PTRjcrLS0BCyOiIAce4ip40SZbbBXYiwduMVR+xIYPXHLUuDNt9lZe3ZV/W wJBTwFyrmg08GKLJW76eXETwp7obIsYvchmrqUbqnMrzMASWRnUwum6oiF0eDi99 toVPlrqyQKmad9Q8yP5PC8JRuMHpri+7mFiADFYFW4ikBU+ScmGjtZnnEX985BHK FRIlApxiWAoTD4zuod5wfiSTDYOO9WTSQEgcnLWLgfI0nJZnY2GVAELdQZ2MH7HU bmbZ3NEbuX7+HB62h3gcwXZlqMAxk96YJxVx5NQSinB6dqN4C5NMNdHLFuKMLkst vokSPK56yRedJp1sfP8oGitn8ds70CiSfmF9A3ytJr041PzzHnE4FyfzvJwGKftz jxpqLmBWwiN5p2tVbLdzZBF0haXapcU52dpehF2C69XNfr+jQnyY7uQ8AJeqFWqo PGkCSj5XcAbiv0bfxZQVhV9bBeLaPYzctOScmt5lHUdw9BeBQZZRCekXiSVBrpSU 7LQd7xwPyCwFvelhj4hjPr0K4IqH2Tq+IrLOXbLrQ1phFyTuo9yXJBpNlk6pTCOR QH8IEf0E9O6V7UUD+52RpGUUcRiw5zn2Pw662pcvOhhSmxg1uIk= =MRQr -----END PGP SIGNATURE----- --+3g2ABFDKnnRiK3d--