Re: [vpp-dev] query on pool memory usage

2020-04-08 Thread Dave Barach via lists.fd.io
Vpp has a built-in leakfinder which should help. Try:

“memory-trace on main-heap”



“show memory main-heap [verbose]”

Which will display objects allocated since “memory-trace on”, complete with the 
allocation backtrace.

Suggest turning off debug CLI history to avoid looking at newly-allocated debug 
CLI history items.

Suggest changing the cmake option VPP_VECTOR_GROW_BY_ONE 
CLIB_VECTOR_GROW_BY_ONE to ON. Multiple ways to do that. Simplest / crudest: 
edit src/vppinfra/CMakeLists.txt and rebuild.

Each time a vector or pool expands by a single element, you’ll see it in the 
memory allocator trace...

Don’t forget to turn off “grow_by_one” its definitely not to be used in 
production.

HTH... Dave

From: vpp-dev@lists.fd.io  On Behalf Of Satya Murthy
Sent: Wednesday, April 8, 2020 9:14 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] query on pool memory usage

Hi,

Is there anyway we can get info what are all vectors and pools each plugin is 
using and their corresponding memory usage.
We are chasing some memory leak issue and if VPP has a builtin way of getting 
this info, we want to take leverage of it.

If VPP does not have any built-in way, do you guys think, its better to go 
through each pool and print pool_bytes and entries in use/free to track this.
Is this the way to go (or) any other tricks in this area ?

--
Thanks & Regards,
Murthy
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16035): https://lists.fd.io/g/vpp-dev/message/16035
Mute This Topic: https://lists.fd.io/mt/72873560/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] query on pool memory usage

2020-04-08 Thread Satya Murthy
Hi,

Is there anyway we can get info what are all vectors and pools each plugin is 
using and their corresponding memory usage.
We are chasing some memory leak issue and if VPP has a builtin way of getting 
this info, we want to take leverage of it.

If VPP does not have any built-in way, do you guys think, its better to go 
through each pool and print pool_bytes and entries in use/free to track this.
Is this the way to go (or) any other tricks in this area ?

--
Thanks & Regards,
Murthy
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16034): https://lists.fd.io/g/vpp-dev/message/16034
Mute This Topic: https://lists.fd.io/mt/72873560/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-