[dpdk-users] DPDK Memory Allocation
Sergio Gonzalez Monroy
sergio.gonzalez.monroy at intel.com
Mon Sep 25 11:52:57 CEST 2017
On 22/09/2017 18:09, Kumaraparameshwaran Rathnavel wrote:
> Hi All,
> We have been using DPDK for quite sometime. First let me tell my assumption on how the DPDK works. For the DPDK memory allocation we give size in terms of MB. When this size is given the rte_eal_memory probes for the sysctl files and figures the starting Physical address of the huge pages. Depending on the size given some number of huge pages should be available. So whenever the memory is not contiguous different segments are formed and each segment is contiguous. The Physical addresses are memory mapped and heap regions are formed and rte_malloc returns the memory from this Heap.
> We give 2GB to our application and the rte_eal initialisation takes place successfully. But in the application the rte_malloc fails. This happens randomly When we reboot the system we don’t see this issue. So my doubt is why does this happen, DPDK memory initialisation is successful but the memory allocation fails. We are sure that application has not consumed 2GB of memory. Is there any condition that we should reboot the system for every run of application that uses DPDK.Should we do anything when we restart the application say some cleanup after the first run.
You give 2GB to the application, is it 2GB total of 2MB size huge pages?
Are there other applications using huge pages?
Do you set cgroup or quota limit on the number of pages to be allocated
by the application?
> Thanking You,
More information about the users