[erlang-questions] Measuring message queue delay
Wed Apr 29 15:06:05 CEST 2015
On Apr 29, 2015 12:55 PM, "Roger Lipscombe" <roger@REDACTED> wrote:
> Hmm, this is ultimately intended for publishing to graphite, rather
> than for live inspection. This means that designating specific
> processes is problematic. What impact would there be having this
> permanently enabled for, say, 30K processes in production? I assume
> that the "tracer" process would get hammered?
Err, yeah, you do not want to do this for all processes.
>From your server, you could start a process that sends regular marker
messages (using refs) to the server. And a tracer process to trace
'receive' against the server and send against the marker process. Your
tracer process can correlate the marker messages and compute times between
send and receive.
That sounds reasonably scalable. Although you might need to make sure your
marker process doesn't flood the server. Probably by synchronising, ie.,
have the server send a reply to the marker.
Having written this down, I think you don't really need tracing with this
at all. Just time stamp the marker messages.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions