All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Kamraan Nasim
	<knasim-LfGgLkH2qHaTtA8H5PvdGFaTQe2KTcn/@public.gmane.org>,
	dev-VfR2kkLFssw@public.gmane.org
Cc: Steve Noble
	<snoble-LfGgLkH2qHaTtA8H5PvdGFaTQe2KTcn/@public.gmane.org>,
	Ashish Juneja
	<ajuneja-LfGgLkH2qHaTtA8H5PvdGFaTQe2KTcn/@public.gmane.org>
Subject: Re: RTE mempool "used count" steadily goes down to zero despite steady packet throughput
Date: Mon, 01 Dec 2014 10:58:15 +0100	[thread overview]
Message-ID: <547C3BB7.5010309@6wind.com> (raw)
In-Reply-To: <CAPrTskgmfxx=0hgnHBg=KMATTUhtp338vxESM=MMU6wTaW8SQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Kam,

On 11/28/2014 06:34 PM, Kamraan Nasim wrote:
> I have ~15Gbps of traffic flowing through two 10GE ports and been profiling
> the rte mempool(or rather the pktmbuf mempool) memory consumption:
> 
> I have per lcore caching disabled(cache_size is 0)
> 
> I have noticed that:
> - Mempool FREE cnt(as given byt rte_mempool_free_count()) increases
> - Mempool USED cnt(as given by rte_mempool_used_count() decreases and
> eventually drops to 0. When this happens, mempool reports itself as EMPTY
> - rx_nombuf stats for the eth ports start climbing
> - Valgrind Memcheck does not indicate any obvious leaks in RTE mempool or
> my application.
> 
> 
> I was wondering if others have come across this issue?  Or if people here
> have used ways, besides Valgrind to profile the mempool or the pkt mbuf
> pool?

First, be careful with rte_mempool_free_count(): it returns the number
of free entries in the internal ring of the mempool, which actually
corresponds to the number of allocated objects from the mempool point
of view. See:
http://dpdk.org/browse/dpdk/tree/lib/librte_mempool/rte_mempool.h

If you have the number of allocated objects increasing, and the
statistics rx_nombuf increasing when the mbuf pool is empty, it means
that you have a mbuf leak in your application. Valgrind won't see it
since it does not know about mempool alloc/free functions.

Regards,
Olivier

  parent reply	other threads:[~2014-12-01  9:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-28 17:34 RTE mempool "used count" steadily goes down to zero despite steady packet throughput Kamraan Nasim
     [not found] ` <CAPrTskgmfxx=0hgnHBg=KMATTUhtp338vxESM=MMU6wTaW8SQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-12-01  9:58   ` Olivier MATZ [this message]
     [not found]     ` <547C3BB7.5010309-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-12-02  2:35       ` Kamraan Nasim

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=547C3BB7.5010309@6wind.com \
    --to=olivier.matz-pdr9zngts4eavxtiumwx3w@public.gmane.org \
    --cc=ajuneja-LfGgLkH2qHaTtA8H5PvdGFaTQe2KTcn/@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=knasim-LfGgLkH2qHaTtA8H5PvdGFaTQe2KTcn/@public.gmane.org \
    --cc=snoble-LfGgLkH2qHaTtA8H5PvdGFaTQe2KTcn/@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.