[dpdk-dev] shared memory statistic

Burakov, Anatoly anatoly.burakov at intel.com
Mon Dec 18 12:27:03 CET 2017


On 15-Dec-17 3:39 AM, liupan1234 wrote:
> Hi all,
> 
> 
> I have an urgent question:
> 
> 
> 1) when an app runs, how to get the really memory it used in real time? for example, it use -m param to specify 1G memory, but it only used 500 MB, how to get this info
> 2) When several apps runs with shared memory: shm 0, is there any method to get the memory used info for each process?
> 
> 
> Thanks
> Pan
> 

For 1, i'm assuming you mean "how much of allocated memory is in use by 
DPDK". I don't think there is a unified API to do that, the closest you 
can get is check heap statistics (since all DPDK memory allocation is 
done through rte_malloc one way or another) and, check them against 
physical memory layout (available via rte_eal_get_physmem_layout()), 
which will give you a list of all memsegs DPDK currently has allocated.

For question 2, DPDK processes share all memory with each other, so 
there isn't any way to tell which process owns which memory.

-- 
Thanks,
Anatoly


More information about the dev mailing list