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 1mNrjS-000484-Bz for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Sep 2021 07:10:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mNrjR-0006KL-66 for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Sep 2021 07:10:53 +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 1mNrjQ-0006KC-Ud for pgsql-hackers@lists.postgresql.org; Wed, 08 Sep 2021 07:10:52 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNrjK-000348-K5 for pgsql-hackers@postgresql.org; Wed, 08 Sep 2021 07:10:52 +0000 Received: from hrk.local (p2388012-ipbf1027funabasi.chiba.ocn.ne.jp [118.6.6.12]) by oss.nttdata.com (Postfix) with ESMTPSA id EE7BB6079D; Wed, 8 Sep 2021 16:10:42 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.3 at oss.nttdata.com Subject: Re: Estimating HugePages Requirements? To: Michael Paquier , "Bossart, Nathan" Cc: Justin Pryzby , Andres Freund , Magnus Hagander , Mark Dilger , Don Seiler , "pgsql-hackers@postgresql.org" References: <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> <578A8F79-FD13-4408-865F-4D31EE5D8123@amazon.com> From: Fujii Masao Message-ID: <4cc5b434-b174-9aae-197b-737db6cac4e3@oss.nttdata.com> Date: Wed, 8 Sep 2021 16:10:41 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021/09/08 12:50, Michael Paquier wrote: > On Tue, Sep 07, 2021 at 05:08:43PM +0000, Bossart, Nathan wrote: >> On 9/6/21, 9:00 PM, "Michael Paquier" wrote: >>> + 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. >> >> I fixed this in v7. > > Switched the variable name to shared_memory_size_mb for easier > grepping, moved it to a more correct location with the other read-only > GUCS, and applied 0002. Well, 0001 here. Thanks for adding useful feature! + {"shared_memory_size", PGC_INTERNAL, RESOURCES_MEM, When reading the applied code, I found the category of shared_memory_size is RESOURCES_MEM. Why? This seems right because the parameter is related to memory resource. But since its context is PGC_INTERNAL, PRESET_OPTIONS is more proper as the category? BTW, the category of any other PGC_INTERNAL parameters seems to be PRESET_OPTIONS. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION