Rails Performance
Jul 15th, 2006 by phil
Someone recently ran a benchmark comparing Rails to Django and Symfony and the posted the results on the Rails wiki. The gist of the benchmark is that the author created some dynamic content in all three frameworks and then used siege to hammer the server with 50 and then 150 concurrent users. At 50 users Symfony was only able to manage 47.67 transactions per second while Rails managed 88.15 and Django managed 124.74. Symfony fell over at 150 concurrent users whereas Rails and Django more or less held steady at 81.49 and 110.10 transactions per second, respectively.
The author’s conclusions are that
Rails performed much better than Symfony. And Django performed much better than Rails.
I read the results differently. If the purpose of this exercise was to help choose an MVC framework, then it seems clear that Symfony has bee ruled out due to extremely poor performance. However, the difference in performance between Rails and Django is much less significant than the difference between Rails and Symfony. There may even be a set of circumstances where a Rails application would outperform the equivalent Django application.
Ultimately, I don’t think it really matters. The real lesson seems to be that both Django and Rails offer acceptable performance. If Django is fast enough (or scalable enough) to handle your application, then Rails probably is as well. Choose the framework with a development model that you like and that makes you feel productive. 20 or 30 transactions per second in a benchmark like this doesn’t seem to be solid basis for making a good decision.
That having been said, I am curious as to what caused the difference in performance. Is it that the Python VM implementation is much better or is the Rails framework itself a little sluggish somewhere?


