DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] DPDK Memory Allocation
@ 2017-09-22 17:09 Kumaraparameshwaran Rathnavel
  2017-09-25  9:52 ` Sergio Gonzalez Monroy
  0 siblings, 1 reply; 2+ messages in thread
From: Kumaraparameshwaran Rathnavel @ 2017-09-22 17:09 UTC (permalink / raw)
  To: users

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.

Thanking You,
Param.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-users] DPDK Memory Allocation
  2017-09-22 17:09 [dpdk-users] DPDK Memory Allocation Kumaraparameshwaran Rathnavel
@ 2017-09-25  9:52 ` Sergio Gonzalez Monroy
  0 siblings, 0 replies; 2+ messages in thread
From: Sergio Gonzalez Monroy @ 2017-09-25  9:52 UTC (permalink / raw)
  To: Kumaraparameshwaran Rathnavel, users

Hi,

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.

Correct.

> 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?

Thanks,
Sergio

> Thanking You,
> Param.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-25  9:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 17:09 [dpdk-users] DPDK Memory Allocation Kumaraparameshwaran Rathnavel
2017-09-25  9:52 ` Sergio Gonzalez Monroy

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).