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 1mR3Uc-00075n-8m for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Sep 2021 02:20:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mR3Ub-0001pU-6w for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Sep 2021 02:20:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mR3Ua-0001pM-FY for pgsql-hackers@lists.postgresql.org; Fri, 17 Sep 2021 02:20:44 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mR3UX-0001VB-4k for pgsql-hackers@postgresql.org; Fri, 17 Sep 2021 02:20:42 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 36E6F580C26; Thu, 16 Sep 2021 22:20:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 16 Sep 2021 22:20:39 -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=V/nJqWQ5Zuq9tBXmUnVurDPB0oi /Okes+ejwc6BadGI=; b=T+FAbj46uZPVulyosesdYgAAXX+N+4rd4QOuVR2ey2V rd+Ns3h8kRxvl8UfqgC302jbmVS8xVxxmsAgDWyFtzxXD6Bp5gUYlY0Wt+WdY1wV Ijmf6lO5IimII/SriVCW2xnznr7NIc2RnJRYyNHl+LZaT2HX6TgmQMRd2seEQo/2 8MXVGgccIs4e2/jeNbszBXblkcHDhSIE7G4OsSBEVv9S0f0CYqijCdmgACV061Iw 3atHeF6K3Zu7JxkOYkV+ql715SMiyotGqBaUKHYOyHseCfpk0tBM97HppTa3qI/3 /bN7CgpbyMyCbZz/E/QWYx9bqd6h3TAcVdyueBAkpFg== 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=V/nJqW Q5Zuq9tBXmUnVurDPB0oi/Okes+ejwc6BadGI=; b=t+bSfslJ0HJKB5cOYsBvpJ oreJJGZYwfJEM6aaVqp+S0kxxWuAD4+PQY2cCZRYxTKpgHnhUDIkls3JD/Ged48b 2x3Hl7JW2srbyNJr/aHyUa45zFJcEG0whN0h0ZqwB71M3V0XGbN7xfkMc6MZK2WL ndWuxduLSL8FvIVLDwR561z7foLlegyfmBohSM7vNQQYcIV0TXF5IfWH+S0nzNUE Qhs00aqfYS3e4HldYjmrqoGmvilgRgPZ3ZrBjos7FB54WFws0az6WaFmQ0hfgyXj YEbkeHZrf2Ya3ysZWezjhZweCi+v4aSz5F1+tOBFNpw1KspK+V4/aXM00AbsiAJQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehhedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Sep 2021 22:20:34 -0400 (EDT) Date: Fri, 17 Sep 2021 11:20:30 +0900 From: Michael Paquier To: "Bossart, Nathan" Cc: Justin Pryzby , Kyotaro Horiguchi , "tgl@sss.pgh.pa.us" , "robertmhaas@gmail.com" , "masao.fujii@oss.nttdata.com" , "andres@anarazel.de" , "magnus@hagander.net" , "mark.dilger@enterprisedb.com" , "don@seiler.us" , "pgsql-hackers@postgresql.org" Subject: Re: Estimating HugePages Requirements? Message-ID: References: <506431.1631564654@sss.pgh.pa.us> <20210914.094936.565951707453489109.horikyota.ntt@gmail.com> <20210916171427.GR831@telsasoft.com> <4E144FAA-F3B1-42C3-9748-714ADB4BCC22@amazon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ai2ItL4zxkSpVHAq" Content-Disposition: inline In-Reply-To: <4E144FAA-F3B1-42C3-9748-714ADB4BCC22@amazon.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ai2ItL4zxkSpVHAq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 16, 2021 at 09:26:56PM +0000, Bossart, Nathan wrote: > I'm not sure I agree on this one. The documentation for huge_pages > [0] and shared_memory_type [1] uses the same phrasing multiple times, > and the new shared_memory_size GUC uses it as well [2]. I don't see > anything in the documentation that suggests that shared_buffers is the > only thing in the main shared memory area, and the documentation for > setting up huge pages makes no mention of any extra memory that needs > to be considered, either. Looks rather sane to me, FWIW. I have not tested on Linux properly yet (not tempted to take my bets on the buildfarm on a Friday, either), but I should be able to handle that at the beginning of next week. + GetHugePageSize(&hp_size, &unused); + if (hp_size != 0) I'd rather change GetHugePageSize() to be able to accept NULL for the parameter values, rather than declaring such variables. + To determine the number of huge pages needed, use the + postgres command to see the value of + . We may want to say as well here that the server should be offline? It would not hurt to duplicate this information with postgres-ref.sgml. + This setting is supported only on Linux. It is always set to Nit: This paragraph is missing two s for Linux. The docs are random about that, but these are new entries. -- Michael --ai2ItL4zxkSpVHAq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmFD+24ACgkQnvQgOdby QH1EVA//diKfTaxkE/3uw5pD9jkUAheruSF9pu0ZhgVmZyjTWqtJvFBerhpJOr3o tETL7WqNQZE3ZWR7JbTfaXc5i2NeCU/w+QaiWWIJPK75av/MfebeL68VnmcQI+SU 7oGyFrWuo4ENh5Q3sDAEJkyyJZfJMtnRoc6SqKEoWBoQPiqqv5wF98SDTC95UucA mF778MC7pf9c/z9T14GnBmVgj6jDwbaejMwjMXVr+Xf/Oh3CiTNmy19Zc7+PUN68 c5OOC/KlNKA2Ao2U0w1sw0PgqWHZLl0Lsan+moxpXUYTpul2BiRa77oNFTiroNr+ Z/ssn6g76HD6QE5irxlXb+hu9bvvrO++EZWX6kLTKj6gCy49wS84cgFCnX4l2hCt p377lXwFNRt0dVRQ1zSD5aM52CmQufKJsvgoWkrdo4GsyosW6gNSCLXE5xoesVbE kgfdu/nYW/BTSJeVCmDirGkO8poPFCfuJP2rJAKx2GPH/SEDFyVOThN6/Bky8g8h wZIwyfcXMiBEevVoDWxqEpUmH/51amW5hUPrJlnUaKuuXqqDFMQsqujcOh/MSHVd U2DBR/uOR95qRLgkd//t/d4JNL2jsBXU23LqNEL3dElzkllldvzh0GmJqk8eSi2E TVbYN5rzfl8kpWQbfgS5Opar54md8fj8fykg/o7IbfxmE861/Q0= =8Kxd -----END PGP SIGNATURE----- --ai2ItL4zxkSpVHAq--