[rabbitmq-discuss] RabbitMQ What /are/ you doing?!

Alvaro Videla videlalvaro at gmail.com
Thu Sep 15 17:11:50 BST 2011


I hope this DTrace branch gets merged with the default Erlang. I think is
quite useful

On Thu, Sep 15, 2011 at 6:00 PM, Jason J. W. Williams <
jasonjwwilliams at gmail.com> wrote:

> OpenIndiana and  (open Solaris) are great Rabbit platforms. FreeBSD has
> DTrace too. DTrace for Linux isn't up to snuff with the other platforms yet,
> but it's still worlds ahead of SystemTap.
>
> -J
>
> Sent via iPhone
>
> Is your email Premiere?
>
> On Sep 15, 2011, at 8:03, Alvaro Videla <videlalvaro at gmail.com> wrote:
>
> <https://twitter.com/hylomorphism/status/114000680875851776><https://twitter.com/hylomorphism/status/114000680875851776><https://twitter.com/hylomorphism/status/114000680875851776><https://twitter.com/hylomorphism/status/114000680875851776><https://twitter.com/hylomorphism/status/114000680875851776>
> Hi,
>
> I saw Matthew tweeting "Oh RabbitMQ, why are you taking over an hour to
> recover 100k queues? What /are/ you doing?!" <https://twitter.com/hylomorphism/status/114000680875851776>
> https://twitter.com/hylomorphism/status/114000680875851776
>
> I've been doing some stuff at work with DTrace and I think is pretty cool
> when it comes to find out what a process is actually doing.
>
> At the same time there's an experimental OTP fork on Github that adds
> Dtrace probes to Erlang:  <https://github.com/dustin/otp/wiki/DTrace>
> https://github.com/dustin/otp/wiki/DTrace
>
> See here for the available probes: <https://github.com/dustin/otp/blob/dtrace/erts/emulator/beam/erlang_dtrace.d>
> https://github.com/dustin/otp/blob/dtrace/erts/emulator/beam/erlang_dtrace.d
>
> So for example running RabbitMQ based on that Erlang branch you could do
> things like in this gist:  <https://gist.github.com/1219266>
> https://gist.github.com/1219266
>
> erlang$target:::function-entry
> /copyinstr(arg1) == "rabbit_exchange_type_direct:route/2"/
> {
>     printf("%s %s", probemod, probefunc);
>     self->traceIt = 1;
> }
>
>
> There I enable the flag traceIt only when route/2 is called on the direct
> exchange.
>
> From there is just a matter of adding probes to different syscalls or io
> access etc based using patterns on that flag like:
>
> erlang$target:::function-entry
> /self->traceIt/
> {
>  //do something here
> }
>
> and so on.
>
> You can run the gist like: sudo dtrace -s route.d -p `pgrep beam.smp`
>
> The examples are really basic but I think they illustrate the point. With
> that Erlang branch you could enable more granular probes than with the usual
> pid provider or dtruss.
>
> BTW, this works on Mac and Solaris. AFAIK on Linux some Kernel modules are
> required.
>
> Cheers,
>
> Alvaro
>
> _______________________________________________
>
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110915/78ed13e6/attachment.htm>


More information about the rabbitmq-discuss mailing list