2025-03-03 15:52 (UTC+0100), Lucas: > Hi Dmitry, > > Excuse my late reply. > My system is configured with 1G huge page size upon boot and then later on > I issue `sysctl -w vm.nr_hugepages=700` > 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. > 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. > Most time is spent in mmap and in memsets. > > Let me know what you think and perhaps if there are ways to improve the > loading time.
Thanks for the profile, Lucas. [1] suggests that allocation would take about (500 / 32) * 2.16 = 33.75 sec. You can run "malloc_perf_autotest" in "dpdk-test" to estimate for your HW. I don't know any simple and secure way to speed up the kernel part. Restart can be made faster as [1] suggests, but not the first start. Try investigating other parts of the profile that take place in user space. [1]: https://inbox.dpdk.org/dev/20211230143744.3550098-1-dkozl...@nvidia.com/