From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0503C463B5 for ; Tue, 11 Mar 2025 07:01:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CA6C40261; Tue, 11 Mar 2025 07:01:27 +0100 (CET) Received: from ns.mahan.org (unknown [23.24.207.145]) by mails.dpdk.org (Postfix) with ESMTP id 5782C400D7 for ; Tue, 11 Mar 2025 07:01:26 +0100 (CET) Received: from [10.0.0.184] (c-24-23-255-47.hsd1.ca.comcast.net [24.23.255.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ns.mahan.org (Postfix) with ESMTPSA id 4C15C28B7C; Mon, 10 Mar 2025 23:01:45 -0700 (PDT) Message-ID: <60c59649-a393-4d45-81e2-faad68b8a506@mahan.org> Date: Mon, 10 Mar 2025 23:01:21 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Calculating number of HugeTLBs required Content-Language: en-US To: Stephen Hemminger Cc: users@dpdk.org References: <20250310142140.4841e75b@hermes.local> From: Patrick Mahan In-Reply-To: <20250310142140.4841e75b@hermes.local> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On 3/10/25 2:21 PM, Stephen Hemminger wrote: > On Tue, 4 Mar 2025 11:22:50 -0800 > Patrick Mahan wrote: > >> Morning, >> >> This might be simple question, but it has my curiosity itching. >> >> I did a quick scan through the documentation, but I did not see any good >> guidelines for determining the number of HugeTLB based on the number of PMDs and >> number of RX/TX queues. >> >> I'm am looking at three different platforms, one has 2 ports (ixgbe), one has 3 >> ports (1 e1000 and 2 i40es) and a third has 2 ports (1 e1000 and 1 Cavium liquidIO). >> >> I'm trying to come up with some means of defining the HugeTLB requirements other >> than trial and error. >> >> Thanks, >> >> Patrick > > There is on exact way to estimate this. But for most applications the largest memory footprint > is the mbuf pool. For sizing the mbuf pool you need to account for all the NIC's, queues, and descriptor arrays > as well as any internal staging buffers. That's what I thought, but I was hoping for some group wisdom here. I am trying to construct the various startup (two are systemd and one is still sysvinit) to try and calculate this based on, as you pointed out, the # of NICS, the # of queues, etc. The code was already using HugeTLBs for other stuff (RiB/FiB, database) that I had written code to calculate that information based on the # of entries in the database, the maximum # of routes, etc at boot time to reserve. The move to DPDK adds more complexity to this as we are looking at leveraging more CPU cores, which may mean more queues, which means more packets, etc. Right now I've done some, back of the envelope, calculations, but that is not a way to dynamically approach this. Anyways, thanks for responding... Patick