Benchmarking Hot Paths & Finding Memory Leaks

Hey guys,

I seem to have a memory leak in my application - checking the :observer, it seems to come from a specific library I’m using that’s critical to my application. The message queue just keeps going up and up, and the number of Reds/mem usage too.

Is there a way to benchmark what it’s doing to find what functions/specific process calls are culprit for this?

Also, the MsgQ is just counting the number of messages in the mailbox awaiting to be responded to within a GenServer from Erlang process calls, right?

Thanks!

Part II of Erlang in Anger (free) has chapters on Memory Leaks and Tracing that will likely be useful.

MsgQ is the length of the message queue, i.e. the number of messages in the mailbox (which I assume you meant rather than “number of processes in the mailbox”)

2 Likes

Thanks! I’ll read that now, and yes that’s what I meant.