
Benchmarking Tornado vs. Twisted Web vs. Tornado on Twisted vs. Unicorn - acangiano
http://antoniocangiano.com/2009/09/13/benchmarking-tornado-vs-twisted-web-vs-tornado-on-twisted-vs-unicorn/
======
viraptor
It would be interesting if Twisted people actually looked at the problem and
tried to tune their framework to match the performance... Since someone from
that team (afaik) already argued that Twisted can be just as fast, they should
be inclined to prove it.

------
paul
It would also be fun to see how the raw Tornado httpserver
([http://github.com/facebook/tornado/blob/master/tornado/https...](http://github.com/facebook/tornado/blob/master/tornado/httpserver.py))
performs without the Tornado web.py framework on top of it.

------
xal
Testing against unicorn makes no sense whatsoever. Test against eventmachine-
httpserver, that's similar in scope and featureset.

~~~
acangiano
I agree that it could have been left out as it's a different beast. But I
wanted to compare Tornado and the others with one of the fastest (and
increasingly popular) web server from the Ruby world.

PS: I'm about to update my post with the results from Thin and
evma_httpserver.

PS2: My post has been updated.

~~~
acangiano
I decided to keep asynchronous, non-blocking web servers only. So I removed
both Unicorn and Thin.

------
adamt
Be careful about reading to much into this - ApacheBench is a very limited (if
convenient) benchmark that isn't very realistic of real world load.

~~~
boucher
3-4x the number of simultaneous connections (ignoring the actual performance
gains) strikes me as pretty significant, even under a limited test.

~~~
moe
The test is not just limited, it's completely meaningless because the portion
of the stack he tested is not going to be your bottleneck in any real
application. When will people learn that 'ab' is not a suitable benchmark for
application servers...

------
fizx
Did not expect to see EM-httpserver kicking ass.

~~~
paul
I think it's a c++ library (based on scanning the docs -- I could be wrong),
so it's not too surprising to see it outperforming pure Python solutions.

~~~
alecco
Indeed.
[http://github.com/eventmachine/eventmachine/raw/b4765960db91...](http://github.com/eventmachine/eventmachine/raw/b4765960db9136197767ca028039650d75f9307d/README)

    
    
      EventMachine consists of an extension library written in C++ (which can be
      accessed from languages other than Ruby)
    

So the post compares pure Python web frameworks with a C++ library. And not
even a good library based on Boost/Asio or libevent.

~~~
FooBarWidget
55% of EventMachine's codebase is written in Ruby. Some parts of Tornado is
written in C.

~~~
paul
Only in the sense that Python is written in C. Tornado has a C module to
expose the epoll system call on older versions of Python, but it's not needed
at all with Python 2.6.

------
acangiano
I updated my post and introduced substantial changes.

------
jraines
Is it possible to take advantage of this with any existing Ruby framework?

------
erlanger
People, please stop benchmarking with ab, it does not produce accurate
results. All benchmarking of this sort should be done with Siege. It's easier
to use too.

~~~
acangiano
Would using Siege radically change the results?

~~~
erlanger
Yep, I'd expect it to halve the requests per second for every test. Paul Jones
(created the Solar framework) periodically releases some pretty authoritative
benchmarks for the major PHP frameworks, and here's what he has to say on the
topic:

<http://paul-m-jones.com/?p=421>

~~~
dsp
His assertions are not confidence inspiring:

<http://paul-m-jones.com/?p=413#comment-410123>

