How Twitter got a 30% performance boost from DTrace

Twitter has experienced meteoric growth in the last few months, and as most users of the service know, that has resulted in some stability issues. Growing pains. I just came across this post by one of my cohorts, David Steward, over at the Intel Software Network blog on DTrace, a Solaris feature that Linux people drool over, and how the Twitter devs were able to squeeze a 30% performance boost out of Ruby on Rails using it:

The recent example they used was Twitter. Remember my recent comments about this new micro-blogging application? Well it turns out that the gang at Twitter implemented their system using Ruby on Rails, the new and sexy rapid website programming system. After the article in the New York Times, Twitter has grown in popularity to be the biggest application of Ruby on Rails. And of course, they were having performance problems.

Fortunately for Twitter, they implemented it on Solaris, and thus DTrace to the rescue. Within a few hours, they had identified an issue with how often deep stack back traces were being taken, they get a fix from the Ruby guys and had a 30% performance boost.

Thanks for the post, David. Now, how about getting DTrace ported to Linux (and Mac, while you’re at it!). 😉


3 thoughts on “How Twitter got a 30% performance boost from DTrace

  1. Damn, beaten by Erik.

    I too was gonna pop in here to burst your bubble 😀 What’s even better about the Mac version is that they’ve made a beautiful graphical wrapper around it as well. Nice!

  2. Thanks for the pingback, Josh!

    It’s going to take a while for DTrace to appear on Linux, because of some silly licensing problem – a bunch of kernel work is required to support DTrace, and the Linux kernel is licensed under GPL, so the idea has to be re-implemented under GPL.

    I posted some comments back on my blog about this as well.

Comments are closed.