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

Jason J. W. Williams jasonjwwilliams at gmail.com
Thu Sep 15 17:21:45 BST 2011


DTrace is pretty amazing. We've been using it for troubleshooting MySQL since 2006 (OpenSolaris/OpenIndiana). Once you've used it, it's hard to live without. Strace doesn't even hold a candle. 

-J

Sent via iPhone

Is your email Premiere?

On Sep 15, 2011, at 10:11, Alvaro Videla <videlalvaro at gmail.com> wrote:

> 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:
> 
>> 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
>> 
>> 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
>> 
>> See here for the available probes: 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
>> 
>> 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/2c07d6d9/attachment.htm>


More information about the rabbitmq-discuss mailing list