From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30582A04B0 for ; Wed, 9 Dec 2020 19:30:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3F70BBE79; Wed, 9 Dec 2020 19:30:42 +0100 (CET) Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) by dpdk.org (Postfix) with ESMTP id 656ABBE77 for ; Wed, 9 Dec 2020 19:30:39 +0100 (CET) Received: by mail-io1-f50.google.com with SMTP id q137so2614159iod.9 for ; Wed, 09 Dec 2020 10:30:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=37LFysZsnpx2PwKwRfCPNh0W/ztY22FYUtXz60bEti4=; b=pTm39mSP1cMujMvztklqPlPTuz+J3FB6HpmnZLE5uroPeb29NB9d3yOpGlZCeGl1Kw 4h0a41wU85PieObj2YyECjyjJBGRHkbzrdgC9Cs9mbwgDS3EeptHfojDHP89Du05IO/C nzbU4mHuZH8MNZuJ5DfAVI4NvR9jT6ioKi3AsHjDXCEj+/GaM9mYtLDXMkgEE+4Tghrv jeVYiQafjGShheKfzHhkmeuYTDKwPbhQq2Hc50VYOgdbMnUn+z170OjMrwAtyju47nHE hwFOgNZxLiMH1pwyoRcfvmFzV6wI7Hua28wpI/p1XNkw1+3YgAr02w/o9VCVPyFrFxiQ HN/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=37LFysZsnpx2PwKwRfCPNh0W/ztY22FYUtXz60bEti4=; b=nN96ED4DGoXuNoCnDKDXdksuRWH0C0Dy2iIWRpqrPRXeHrVqCSAbTVJQL4e32e6Nh3 JBQRXpC/JHjH7oV88GWInjezrfXHR/FYQXvTS4GG7wd8zjpn30EXil3UfzKdVLoyJXg5 pK3gzEhOaBiRbdytrviL7xRgcUBokqxtGOQ9Tl1py7zj/2/60iJLnMzMGxm09xai8Y34 sEP0+1hOr8jPAekebZVmyTaTePnX7Z8wg3VAuBKqW/g3OC+8Yf1t6oYKKsNpi3JL9NJ8 8EJ3nvY00P/teGUNzt4cv1E25POaY2HiaXWJX4p83r/H9oq2pCCnJ5t8tOFaaGmEO3L3 X1RQ== X-Gm-Message-State: AOAM531pbGc2iGhVhacMIIelGuZHf+vlR5P8Tud6mcLoQx0fd/RjmYA5 IuI/ik9tRJ0dWik2wWYKlu+J21o++xtZlMGsSZz+YCwaQKnvAA== X-Google-Smtp-Source: ABdhPJx72MAb/X5RixauGXNqBfrOctGqm3yFn86QLoAWPqP0tsPVf7BTIn8ANR7CuK4Kx24S5/jZXB2mYiosKsrenE0= X-Received: by 2002:a05:6638:2:: with SMTP id z2mr4741997jao.2.1607538637728; Wed, 09 Dec 2020 10:30:37 -0800 (PST) MIME-Version: 1.0 References: <20201209085932.60a0f9ea@hermes.local> In-Reply-To: <20201209085932.60a0f9ea@hermes.local> From: David Aldrich Date: Wed, 9 Dec 2020 18:30:26 +0000 Message-ID: To: Stephen Hemminger Cc: users Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] Basic hugepages question X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" Thank you for your reply. I estimate the mbuf pools to be ~150MB. So would a sensible hugepages configuration be 100 pages of 2MB each? On Wed, Dec 9, 2020 at 5:00 PM Stephen Hemminger wrote: > On Wed, 9 Dec 2020 16:34:29 +0000 > David Aldrich wrote: > > > Hi > > > > Having successfully demonstrated using dpdk with our application, it's > been > > pointed out to me that our settings are using a very large amount of > memory. > > > > I am initialising the EAL with: > > > > -m 16000 > > > > i.e. 16GB! > > > > However, I am only specifying a count of 0x4000 to rte_ring_create(), > which > > I call twice to create one Rx and one Tx ring. So I guess these are only > > using 32MB RAM total. > > > > My questions are: > > > > 1) What would be a sensible amount of memory to specify with the '-m' > > parameter to the EAL? > > 2) What size / number of hugepages should I allocate in Linux? > > > > (I currently use boot parameters: 'hugepagesz=1G hugepages=20 > hugepagesz=2M > > hugepages=0'). > > > > Best regards > > David > > For most DPDK applications the predominate user of huge pages is any > mbuf pools you create. You should be able to calculate the worst case size > of all rings and mbuf pools and size your huge memory from that. >