You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Nick Dunkin <Ni...@vecima.com> on 2021/01/22 19:01:49 UTC

Tracing memory leaks in ATS plug-ins

Hi,

We are currently in the process of trying to determine if we have a memory leak in one of our own ATS plug-ins.   Our plug-ins are implemented using the bundled C++ API framework, and we use any number of the standard C++ container classes.  We are currently on version 7.1.4 of Traffic Server.

The Traffic Server documentation is fairly brief on the subject and refers to the use of the following property to dump detailed information to the logs:

CONFIG proxy.config.dump_mem_info_frequency INT <value>

I should make it clear that we are seeing a general upward trend in memory usage of the “TS-MAIN” process, and we are trying to understand if that upward trend is due to “plug in” memory usage or “traffic server” memory usage.  Our own plugins use the standard C++ new/delete to create and free memory.

Is there a simple way, from the memory dump information, to differentiate between the memory we are allocating in our own plug-ins, and Traffic Server’s own memory allocations, which I believe use their own memory model.

We are keen to hear any tips, advice, third-party profiling tools or war stories that you think might help us determine where we are leaking.

Thanks, we appreciate your time,

Nick

Nick Dunkin
Director, Software Engineering
Manager – Architecture and New Product Introduction
o:  +1 678.258.4071
e: nick.dunkin@vecima.com<ma...@vecima.com>

[cidimage001.png@01D6CC8C.6FC5A580]

Re: Tracing memory leaks in ATS plug-ins

Posted by Shu Kit Chan <ch...@gmail.com>.
Perhaps you can see if this trick can help you?
https://cwiki.apache.org/confluence/display/TS/Presentations+-+2017?preview=/70255385/74684709/ATSSummit_jemalloc.pptx

Also the experimental memory_profile plugin is using the same trick to help
memory debugging as well.

Thanks.

Kit

On Fri, Jan 22, 2021 at 11:02 AM Nick Dunkin <Ni...@vecima.com> wrote:

> Hi,
>
>
>
> We are currently in the process of trying to determine if we have a memory
> leak in one of our own ATS plug-ins.   Our plug-ins are implemented using
> the bundled C++ API framework, and we use any number of the standard C++
> container classes.  We are currently on version 7.1.4 of Traffic Server.
>
>
>
> The Traffic Server documentation is fairly brief on the subject and refers
> to the use of the following property to dump detailed information to the
> logs:
>
>
>
> CONFIG proxy.config.dump_mem_info_frequency INT <value>
>
>
>
> I should make it clear that we are seeing a general upward trend in memory
> usage of the “TS-MAIN” process, and we are trying to understand if that
> upward trend is due to “plug in” memory usage or “traffic server” memory
> usage.  Our own plugins use the standard C++ new/delete to create and free
> memory.
>
>
>
> Is there a simple way, from the memory dump information, to differentiate
> between the memory we are allocating in our own plug-ins, and Traffic
> Server’s own memory allocations, which I believe use their own memory model.
>
>
>
> We are keen to hear any tips, advice, third-party profiling tools or war
> stories that you think might help us determine where we are leaking.
>
>
>
> Thanks, we appreciate your time,
>
>
>
> Nick
>
>
>
> *Nick Dunkin*
>
> Director, Software Engineering
>
> Manager – Architecture and New Product Introduction
>
> *o: * *+1 678.258.4071*
>
> *e:* nick.dunkin@vecima.com
>
>
>
> [image: cidimage001.png@01D6CC8C.6FC5A580]
>