* [dpdk-dev] RTE mempool "used count" steadily goes down to zero despite steady packet throughput
@ 2014-11-28 17:34 Kamraan Nasim
2014-12-01 9:58 ` Olivier MATZ
0 siblings, 1 reply; 3+ messages in thread
From: Kamraan Nasim @ 2014-11-28 17:34 UTC (permalink / raw)
To: dev; +Cc: Steve Noble, Ashish Juneja
Hello,
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?
Thanks,
Kam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] RTE mempool "used count" steadily goes down to zero despite steady packet throughput
2014-11-28 17:34 [dpdk-dev] RTE mempool "used count" steadily goes down to zero despite steady packet throughput Kamraan Nasim
@ 2014-12-01 9:58 ` Olivier MATZ
2014-12-02 2:35 ` Kamraan Nasim
0 siblings, 1 reply; 3+ messages in thread
From: Olivier MATZ @ 2014-12-01 9:58 UTC (permalink / raw)
To: Kamraan Nasim, dev; +Cc: Steve Noble, Ashish Juneja
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] RTE mempool "used count" steadily goes down to zero despite steady packet throughput
2014-12-01 9:58 ` Olivier MATZ
@ 2014-12-02 2:35 ` Kamraan Nasim
0 siblings, 0 replies; 3+ messages in thread
From: Kamraan Nasim @ 2014-12-02 2:35 UTC (permalink / raw)
To: Olivier MATZ; +Cc: dev, Steve Noble, Ashish Juneja
Thanks Oliver for the helpful tip, that settles the confusion as to why
Free count grows and used shrinks.
I've modified the rte_mempool library to maintain atomic pktmbuf malloc and
free stats, hopefully that would help pinpoint the leak.
Thanks again for your help!
--Kam
On Mon, Dec 1, 2014 at 4:58 AM, Olivier MATZ <olivier.matz@6wind.com> wrote:
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-02 2:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-28 17:34 [dpdk-dev] RTE mempool "used count" steadily goes down to zero despite steady packet throughput Kamraan Nasim
2014-12-01 9:58 ` Olivier MATZ
2014-12-02 2:35 ` Kamraan Nasim
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).