<span style="font-family:SimSun;">Dear DPDK community,</span><br>
<span style="font-family:SimSun;"><br>
</span><br>
<span style="font-family:SimSun;">I am encountering an issue when attempting to run a 32-bit DPDK application on Linux. Specifically, I am facing a "Cannot allocate memory" error during initialization. While I can mitigate this issue by using the `--no-huge` option, it adversely affects the performance of my application.</span><br>
<span style="font-family:SimSun;"><br>
</span><br>
<span style="font-family:SimSun;">Here is the error output I receive:</span><br>
<span style="font-family:SimSun;"><br>
</span><br>
<span style="font-family:SimSun;">```</span><br>
<span style="font-family:SimSun;">sudo ./app -l 0-1 --proc-type=primary --file-prefix=pmd1 --vdev=net_tap001,iface=tap001 --no-pci</span><br>
<span style="font-family:SimSun;">EAL: Detected CPU lcores: 2</span><br>
<span style="font-family:SimSun;">EAL: Detected NUMA nodes: 1</span><br>
<span style="font-family:SimSun;">EAL: Detected shared linkage of DPDK</span><br>
<span style="font-family:SimSun;">EAL: Multi-process socket /var/run/dpdk/pmd1/mp_socket</span><br>
<span style="font-family:SimSun;">EAL: Selected IOVA mode 'PA'</span><br>
<span style="font-family:SimSun;">EAL: Cannot get a virtual area: Cannot allocate memory</span><br>
<span style="font-family:SimSun;">EAL: Cannot allocate VA space for memseg list, retrying with different page size</span><br>
<span style="font-family:SimSun;">EAL: Cannot allocate VA space on socket 0</span><br>
<span style="font-family:SimSun;">EAL: FATAL: Cannot init memory</span><br>
<span style="font-family:SimSun;">EAL: Cannot init memory</span><br>
<span style="font-family:SimSun;">app: main.c:284: main: Assertion `(ret = rte_eal_init(argc, (char **) argv)) >= 0' failed.</span><br>
<span style="font-family:SimSun;">Aborted</span><br>
<span style="font-family:SimSun;">```</span><br>
<span style="font-family:SimSun;"><br>
</span><br>
<span style="font-family:SimSun;">When debugging with `--log-level=eal,8`, the relevant portion of the output indicates attempts to allocate memory:</span><br>
<span style="font-family:SimSun;"><br>
</span><br>
<span style="font-family:SimSun;">```</span><br>
<span style="font-family:SimSun;">EAL: Attempting to preallocate 2048M on socket 0</span><br>
<span style="font-family:SimSun;">EAL: Ask a virtual area of 0xc000 bytes</span><br>
<span style="font-family:SimSun;">EAL: Virtual area found at 0xeb077000 (size = 0xc000)</span><br>
<span style="font-family:SimSun;">EAL: Memseg list allocated at socket 0, page size 0x800kB</span><br>
<span style="font-family:SimSun;">EAL: Ask a virtual area of 0x80000000 bytes</span><br>
<span style="font-family:SimSun;">EAL: Cannot mmap((nil), 0x80200000, 0x0, 0x22, -1, 0x0): Cannot allocate memory</span><br>
<span style="font-family:SimSun;">EAL: Cannot get a virtual area: Cannot allocate memory</span><br>
<span style="font-family:SimSun;">EAL: Cannot allocate VA space for memseg list, retrying with different page size</span><br>
<span style="font-family:SimSun;">EAL: Cannot allocate VA space on socket 0</span><br>
<span style="font-family:SimSun;">EAL: FATAL: Cannot init memory</span><br>
<span style="font-family:SimSun;">EAL: Cannot init memory</span><br>
<span style="font-family:SimSun;">app: main.c:284: main: Assertion `(ret = rte_eal_init(argc, (char **) argv)) >= 0' failed.</span><br>
<span style="font-family:SimSun;">Aborted</span><br>
<span style="font-family:SimSun;">```</span><br>
<span style="font-family:SimSun;"><br>
</span><br>
<span style="font-family:SimSun;">System information:</span><br>
<span style="font-family:SimSun;">- Hugepages configured: `echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages`</span><br>
<span style="font-family:SimSun;">- Hugepages mounted: `mount -t hugetlbfs hugetlbfs /dev/hugepages`</span><br>
<span style="font-family:SimSun;">- NUMA node information: `numactl --hardware`</span><br>
<span style="font-family:SimSun;">  - available: 1 nodes (0)</span><br>
<span style="font-family:SimSun;">  - node 0 cpus: 0 1</span><br>
<span style="font-family:SimSun;">  - node 0 size: 7896 MB</span><br>
<span style="font-family:SimSun;">  - node 0 free: 3915 MB</span><br>
<span style="font-family:SimSun;">  - node distances:</span><br>
<span style="font-family:SimSun;">    - node 0: 10</span><br>
<span style="font-family:SimSun;"><br>
</span><br>
<span style="font-family:SimSun;">DPDK version: 22.03</span><br>
<span style="font-family:SimSun;">Distribution: Ubuntu 22.04</span><br>
<span style="font-family:SimSun;">Kernel information: Linux hq-virtual-machine 6.5.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 7 09:00:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux</span><br>
<span style="font-family:SimSun;"><br>
</span><br>
<span style="font-family:SimSun;">I believe the issue stems from the attempt to preallocate 2048M on socket 0, but using `-m` or `--socket-mem` options did not resolve the problem.</span><br>
<span style="font-family:SimSun;"><br>
</span><br>
<span style="font-family:SimSun;">Could you please provide guidance on how to properly configure DPDK to avoid this memory allocation issue while maximizing performance?</span><br>
<span style="font-family:SimSun;"><br>
</span><br>
<span style="font-family:SimSun;">Thank you for your assistance.</span><br>
<span style="font-family:SimSun;"><br>
</span><br>
<p>
        <span style="font-family:SimSun;">Best regards,</span> 
</p>
<p>
        <span style="font-family:SimSun;">Quan Hong</span> 
</p>