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 AF228A0547 for ; Mon, 5 Dec 2022 19:28:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41BEF40156; Mon, 5 Dec 2022 19:28:56 +0100 (CET) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTP id E9D6040151 for ; Mon, 5 Dec 2022 19:28:54 +0100 (CET) Received: by mail-pj1-f52.google.com with SMTP id hd14-20020a17090b458e00b0021909875bccso11775981pjb.1 for ; Mon, 05 Dec 2022 10:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=MVXJHJrSEUJS5JqHkvwah3f6utEmzxSrkvA3KPKx/w8=; b=FsLfHOuQkWsSIpoeQOWpFPME7dpiBXEDwPIZBnoBYXiSwMS8XmwARSP+oyXKgdGRa1 JUeRmKdSztHvo49aKUyZUPvnxOFBKmE9MQuW8djYwViCknLwRFA8jcKNgUI0PWHchQpk rSEUGnhdnwq/Y7EacFaZHLmX5zOdjXlFWhsuMaeMmMRzvYui94wwffA78iu018eozolm M0S7QY457PmIYUf9/6lxkK9QwnJGJYoSPaV/QAkfHkxTkFmTKXDZxuxpjwfgBIrETceI DL8ShljiYrcGIdLM3yKPkotrcer7LkQnQlH9XKfjrdbSVFBmZ6EVM4tDcDEJbxafXpwJ 17HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MVXJHJrSEUJS5JqHkvwah3f6utEmzxSrkvA3KPKx/w8=; b=xMQUEloRMD33UQgXwIdmp5Orh7ArBASfz0EXHnpfvhQuUSLdCOHfaQeErs1eyU38SR bBD5AT6Mbl+3nWrx3x2mtBJYEW8uRUh9yXT1bGFAwMyV0wqmIl4EQudzvy+AZAzaIrIK y9qZTYbDYPtJJxOZ12+fwUTmmdCV+ZEl5WKsSebK4mkd9NbM2FGU7PKTcPC3N3xRw1NQ rkPJkEtEKi/Il/GUhIE7/Z7SiHqw2CrGXQwrRKVXIVAHuAWAUQxd/GqTUnVoVnxzGp1x pPEuFY3J9NvrKWegJCy64AwulAvia030l4cxeRwnMMqLAQ+n5ovZgEh8yKj03eVC9yCL 5IKQ== X-Gm-Message-State: ANoB5plZvAYmymqMpFlptSFA82yDxwWu90ZaiSb7i4qWWwaz1mDYanVm 0P8GgGZXWBuKIZbamdYQ2CcjCQ== X-Google-Smtp-Source: AA0mqf7o7705vUpFCbIbzvXkJtSS+YF5KkATgX2OqHTlPTkquLJBlgk4MIeUpJRN/23Rx0AiyNqciQ== X-Received: by 2002:a17:90a:5a41:b0:219:41ef:a812 with SMTP id m1-20020a17090a5a4100b0021941efa812mr38579938pji.153.1670264933739; Mon, 05 Dec 2022 10:28:53 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id u68-20020a626047000000b0057716769289sm1535420pfb.196.2022.12.05.10.28.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 10:28:53 -0800 (PST) Date: Mon, 5 Dec 2022 10:28:51 -0800 From: Stephen Hemminger To: Dylan Baros Cc: users@dpdk.org Subject: Re: How do you calculate DPDK mempool requirements? Message-ID: <20221205102851.73254954@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 Mon, 5 Dec 2022 11:32:40 -0600 Dylan Baros wrote: > How do you figure out what settings need to be used to correctly configure > a DPDK mempool for your application? > > Specifically using rte_pktmbuf_pool_create(): > > - n, the number of elements in the mbuf pool > - cache_size > - priv_size > - data_room_size > > EAL arguments: > - n number of memory channels > - r number of memory ranks > - m amount of memory to preallocate at startup > - in-memory no shared data structures > - IOVA mode > - huge-worker-stack > > My setup: > > - 2 x Intel Xeon Gold 6348 CPU @ 2.6 Ghz > - 28 cores per socket > - Max 3.5 Ghz > - Hyperthreading disabled > - Ubuntu 22.04.1 LTS > - Kernel 5.15.0-53-generic > - Cores set to performance governor > - 4 x Sabrent 2TB Rocket 4 Plus in RAID0 Config > - 128 GB DDR4 Memory > - 10 1GB HugePages (Can change to what is required) > - 1 x Mellanox ConnectX-5 100gbe NIC > - 31:00.0 Ethernet controller: Mellanox Technologies MT27800 Family > [ConnectX-5] > - Firmware-version: 16.35.1012 > - UDP Source: > - 100 gbe NIC > - 9000 MTU Packets > - ipv4-udp packets > > Will be receiving 10GB/s UDP packets over a 100gbe link. Right now trying > to get it working for 2GB/s to a single queue. > > Reviewed the DPDK Programmers guide: > https://doc.dpdk.org/guides/prog_guide/mempool_lib.html Also searched > online but the resources seem limited. Would appreciate any help or a push > in the right direction. > > > Sincerely, > > DB Compute the maximum number of live memory elements in the system. This depends on the NIC card and the queue depths. Add some additional overhead for packets in flight. Size of mbuf depends on MTU, amount of reserved private area etc.