The first time I conducted a performance test between Twisted.web and Tornado, the results were not very meaningful in retrospect. I have three good reasons for redoing the performance tests:
This time, I performed the test with the aid of my friend Travis (thank you!) using The Grinder, a legitimate load testing tool and several virtual machines from the Rackspace Cloud. The servers were Ubuntu Jaunty 9.04 with 2GB or RAM and quad-core 2GHz processors.
The Grinder script that I used to conduct the test just did a simple request. The Grinder test and preferences are available for download. I changed the IP address in the Grinder test to switch between twisted.web and tornado. The following command was used to start the tests:
1 | $ for i in 100 200 300 400 500 750 1000; do java -Dgrinder.threads=$i -cp grinder-3.2/lib/grinder.jar net.grinder.Grinder grinder.pref; done; |
I used the same, simple ”hello, world” response apps for twisted.web and tornado as I did for the previous test. Each app was run as a single threaded application. I also used Python 2.6.2.
The raw data that resulted from The Grinder and html output from the GrinderAnalysis is available for download.
The following results were compiled into a spreadsheet from the GrinderAnalysis tool. The X-axis is an individual test that represents number of concurrent requests. The Y-axis is the mean response time in milliseconds. Lower mean response time is better.

Below are examples of the response times graphs (blue) that I used to compile the above spreadsheet. The entire output from GrinderAnalytics is available for download, as mentioned above. Transactions per second (TPS) is the graph in the green and is maximum number of iterations of the grinder test that successfully ran in a one second interval.

