<div dir="ltr"><div>Hi Dmitry,</div><div><br></div><div>Excuse my late reply. <br></div><div>My system is configured with 1G huge page size upon boot and then later on I issue `sysctl -w vm.nr_hugepages=700`</div><div>It appears that the swapping was caused by some daemon that decided to start up and allocate quite some memory. I no longer observe this effect. <br></div><div>I included a FlameGraph (recorded with perf) from program startup that does a memory allocation for 500 GB (MBUFS + priv data): mempool allocation with 218'531'468 MBUFs. <br></div><div>Most time is spent in mmap and in memsets.</div><div><br></div><div>Let me know what you think and perhaps if there are ways to improve the loading time.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 20, 2025 at 3:55 PM Dmitry Kozlyuk <<a href="mailto:dmitry.kozliuk@gmail.com" target="_blank">dmitry.kozliuk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">2025-02-20 15:19 (UTC+0100), Lucas:<br>
> As for the issue, at 550 GB so 252'757'352 MBUFs (using default mbuf buf<br>
> size), it works now, with ring allocation. However, the physical memory<br>
> usage now goes up a lot and I end up swapping. It appears that not all<br>
> memory is in hugepages (not all pages are filled) and that perhaps the<br>
> kernel also allocates more memory. I have 755 GiB RAM available, so 600 GB<br>
> of mempool is pushing it.<br>
<br>
How is your system configured to reserve hugepages?<br>
DPDK always allocates hugepages; if none are available, allocation fails.<br>
Hugepages never swap AFAIK.<br>
</blockquote></div>