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 1mNSHb-0007gs-EL for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Sep 2021 04: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 1mNSHX-0000uq-MK for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Sep 2021 04:00:23 +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 1mNSHW-0000ui-Co for pgsql-hackers@lists.postgresql.org; Tue, 07 Sep 2021 04:00:23 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNSHR-0002n6-SH for pgsql-hackers@postgresql.org; Tue, 07 Sep 2021 04:00:21 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6C29D5C0120; Tue, 7 Sep 2021 00:00:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 07 Sep 2021 00:00:15 -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=TSDnNv8ttqNsqz39CQRwO+dAIiX ahwrfLkVJRBbImPg=; b=LG29Y4o+hm7F7vch6jnyMCEza6/x9u4TCe5fZys+nac snyGHGFei5nP98+ongwFEYeyhpIIfFyV7ObfXBH6ETv9HD1KgqPNcNQ67YxyRdzy X1aVUhe7AxSn/xiDcDm7IkV72Unbx2pJDfzVI0oAl4kgdgdOg6L+Ng50FhU6C72D JeXT9b1CTxZW/cOGu46jxtMUPAQIHbXNF2myIefc6c1MgXb4kowzMnObDg4q6DBr es+fXbWI7hC3IfEk5nxTkLs43ffSXGzaQjLdxvk2nk8Coo31nX2AKGUtLKFclYz5 fVmNl6Cuo0gtG3zqxM2xfDqJ8sibTlc9/knWoadzAdQ== 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=TSDnNv 8ttqNsqz39CQRwO+dAIiXahwrfLkVJRBbImPg=; b=Es+mbg2PtqM9Vtp8b13g9L id1C+v/ED1ECwq8O1iGbpymb8hrq2QuwsIOwADT2GBZJIcZfOgyRpG2t5i1TxbT2 FVvaD510Rzhrbh180aR1frM5A/aunxKwRyWsd0oSn+RQQfxg/yWVUdhOO5cS6Dl2 9I4Oe9++2CubDFfsR8INRQFSXlhEZixVGnKP4yHtHuPduyG1NRK/WZD6uxuU5Nly nwq4LBjUKa5GL3LtWOkMopkwXaZMueW0nPuIyLqJVrtQhMHYKIoGQIGMJjnP8bXZ V87oRY7o4yg28Vn7p51eZNs5aiSwwl0+tF2QMrh7ELPB1/Ba90zOgIFtBviVjZug == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudefgedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Sep 2021 00:00:11 -0400 (EDT) Date: Tue, 7 Sep 2021 13:00:08 +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: <48795AC4-289F-4CDE-88F5-4FD1ED2BD3DD@amazon.com> <298B6D88-7B71-4E1B-BFC4-E7BF3A32960D@amazon.com> <23F67FC0-E432-4324-BEA4-F99B126510EA@amazon.com> <7ED221D0-0D75-46F8-8D6C-8AF70D8EABE7@amazon.com> <89EFD5FB-3C28-459C-9D6D-C9F93F7C2A54@amazon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+pTFvryGHp9Iyt00" Content-Disposition: inline In-Reply-To: <89EFD5FB-3C28-459C-9D6D-C9F93F7C2A54@amazon.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --+pTFvryGHp9Iyt00 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Sep 06, 2021 at 11:55:42PM +0000, Bossart, Nathan wrote: > Attached is a new patch set. The first two patches just add the new > GUCs, and the third is an attempt at providing useful values for those > GUCs via -C. + sprintf(buf, "%lu MB", size_mb); + SetConfigOption("shared_memory_size", buf, PGC_INTERNAL, PGC_S_OVERRIDE); One small-ish comment about 0002: there is no need to add the unit into the buffer set as GUC_UNIT_MB would take care of that. The patch looks fine. +#ifndef WIN32 +#include +#endif So, this is needed in ipci.c to check for MAP_HUGETLB. I am not much a fan of moving around platform-specific checks when these have remained local to each shmem implementation. Could it be cleaner to add GetHugePageSize() to win32_shmem.c and make it always declared in the SysV implementation? -- Michael --+pTFvryGHp9Iyt00 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmE248gACgkQnvQgOdby QH0Q0A/9HTP3VUUAOHBTaj1B1siV8cKo4Gb7bupYtsZKjxJtDWgafLZ6k2Y/UKvU o2G0v5gtq7aNpE4uLM7I0P670vS+2V1I+Mx4n7hNTi7ldog7E/OPL6eBbBVwRmHx +uTnPP5EqBn74xvvcypd7WjK2QOQetk5bf+gcQjSm9lgp5JGqDZt/qsQemXEze16 UUorGOQEjU6cs88fa15wUbMQT0z0jy8xEYzD2R6miUzd4hPaIkabxGMWq4TWhtvx uXizL6QVOHka2x9f3LtBPT6dQ8uaDyKhPjJKeuJ079Ike8Edt408O/8U6b5FsU4i ozS7k6fRqoQzq13QSAIIE/+CBHJYCZj7njaMHEERMQW0sQ+NeY3/ep582c7B7qTL 426sq1mwaGBo4QoQRLFkpDsoPVeDjax4EXX7pnn7s8yY8R4r50oSgCBh/aPVrXnL CxqJ1YmUwh79Saa9d05Ktu47IRgs+XzplhqGCwvMEjf4RE1nibfmnswtBx9onAGa Ow4uERIXpq2f/als/aKtHkFXokZVgDXhPxo/PHHTjaX2y/nOu2MkkVYK9QM3GEPx 10SG+mTdPNXActLBGKDMU0Wlh8S+EjbJ7bTAxiJPcvVWcrHzmVLrA9m9g11/iI9Z 2AJL3pKfKe96zWgWKEOozssZMteGS72HJMPhEh2f+2KTAY1o2/g= =xBwW -----END PGP SIGNATURE----- --+pTFvryGHp9Iyt00--