DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: P Smith <dpdk_learn-dev@yahoo.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Memory footprint of a PMD
Date: Fri, 3 May 2019 12:03:14 -0700	[thread overview]
Message-ID: <20190503120314.146732cd@hermes.lan> (raw)
Message-ID: <20190503190314.5QT5aIyVLY7DNi6bmzJnWoqCvZNdVbnW12Or_zBKERs@z> (raw)
In-Reply-To: <c1aee76a-1adb-43a5-70f9-f44a3c74d4f9@intel.com>

On Fri, 3 May 2019 11:02:15 +0100
"Burakov, Anatoly" <anatoly.burakov@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.

  parent reply	other threads:[~2019-05-03 19:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <899934402.3791304.1556876242992.ref@mail.yahoo.com>
2019-05-03  9:37 ` P Smith
2019-05-03  9:37   ` P Smith
2019-05-03 10:02   ` Burakov, Anatoly
2019-05-03 10:02     ` Burakov, Anatoly
2019-05-03 19:03     ` Stephen Hemminger [this message]
2019-05-03 19:03       ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190503120314.146732cd@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=dpdk_learn-dev@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).