From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Lucas <lucascrijns@gmail.com>
Cc: users@dpdk.org
Subject: Re: Increase DPDK's virtual memory to more than 512 GiB
Date: Thu, 20 Feb 2025 01:28:28 +0300 [thread overview]
Message-ID: <20250220012828.21ae8b76@sovereign> (raw)
In-Reply-To: <CADTTPn8Cgu3ShDWWGdd9whQQAmiFH9x9MaweZ4DR3XHdcww6Eg@mail.gmail.com>
2025-02-19 15:22 (UTC+0100), Lucas:
> I am creating an application where I want to cache packets in a ring for a
> certain duration. To do so at high speed (100 Gb/s) for tens of seconds, I
> would like to create a mempool with a size bigger than 500 GiB.
> I know that in rte_config.h, we have this excerpt:
> ```
> #define RTE_MAX_MEMSEG_LISTS 128
> ...
> #define RTE_MAX_MEM_MB_PER_LIST 32768
> ```
> 4'194'304 MiB of addressable memory, which is more than enough. However,
> there is a virtual memory limit on DPDK processes on x86_64, which appears
> to be 512 GiB.
> at https://doc.dpdk.org/guides/prog_guide/env_abstraction_layer.html it is
> listed that RTE_MAX_MEM_MB controls that.
> In the meson.build file in the config directory, we have:
> ```
> if dpdk_conf.get('RTE_ARCH_64')
> dpdk_conf.set('RTE_MAX_MEM_MB', 524288)
> else # for 32-bit we need smaller reserved memory areas
> dpdk_conf.set('RTE_MAX_MEM_MB', 2048)
> endif
> ```
> Changing this value does not seem to change the amount of virtual memory
> that DPDK allocates. It appears that no headers or C-files actually
> reference this value.
https://elixir.bootlin.com/dpdk/v24.11.1/source/lib/eal/common/eal_common_dynmem.c#L113
> What would I need to change to allow more virtual memory than 512 GiB and
> be able to allocate a mempool with a size bigger than that?
Increase RTE_MAX_MEM_MB_PER_LIST and RTE_MAX_MEM_MB_PER_TYPE to 512 GB.
See the big comment in the linked function code.
Note that RTE_MAX_MEM_MB must accommodate for all memory types,
e.g. for a 2-processor x86_64 system with 2M and 1G hugepages supported
it must be 2 NUMA nodes x 2 huggepage sizes x 512 GB = 2048 GB.
next prev parent reply other threads:[~2025-02-19 22:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 14:22 Lucas
2025-02-19 15:03 ` Stephen Hemminger
2025-02-19 22:28 ` Dmitry Kozlyuk [this message]
[not found] ` <CADTTPn-zDTotOsCsnkuEQiRDdEfuLGVDo1hmuXetgGLd+TTP6Q@mail.gmail.com>
2025-02-20 11:21 ` Dmitry Kozlyuk
2025-02-20 14:19 ` Lucas
2025-02-20 14:55 ` Dmitry Kozlyuk
2025-03-03 14:52 ` Lucas
2025-03-03 22:05 ` Dmitry Kozlyuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250220012828.21ae8b76@sovereign \
--to=dmitry.kozliuk@gmail.com \
--cc=lucascrijns@gmail.com \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).