[dpdk-dev] Memory footprint of a PMD

Stephen Hemminger stephen at networkplumber.org
Fri May 3 21:03:14 CEST 2019


On Fri, 3 May 2019 11:02:15 +0100
"Burakov, Anatoly" <anatoly.burakov at intel.com> wrote:

> On 03-May-19 10:37 AM, P Smith wrote:
> > Hi,     Given that a dpdk driver uses rte_malloc_xx() and friends to allocate/free its memory what is the best way to find out the runtime memory footprint of a PMD ? One can use 'malloc_info' to dump the malloc output in case of general 'malloc' ...but what is the way here since it's all hugepages ? How to know the memory /footprint of my testpmd /application at different points during run-time?Is there a tool or some API i can invoke to find out the same?
> > Thanks P
> >   
> 
> I don't think there is a way to do this currently, other than tracing 
> all PMD's allocations.
> 
> That said, there is an API to find total usage of DPDK memory - look int 
> rte_malloc_heap_stats related API's.
> 

rte_malloc and friends allocate from memory pool in huge pages, not the normal
malloc heap. The mempool does have compile option for debug which does keep statistics.
Then rte_mempool_dump (or rte_mempool_walk and rte_mempool_dump) can be used to show info.


More information about the dev mailing list