I just did a benchmark comparison on Tornado Web Server and Apache + PHP server. The result is pretty amazing.
What to test:
A simple Hello World application.
How:
ab -n 1000 -c 300 http://myserver.ip
Test Environment
OS: FreeBSD 7.1
CPU: Pentium III 933 MHz
Ram: 256 MB
PHP: 5.2.9
Python: 2.5.4
Tornado: 0.2
Result:
Apache + PHP:
Concurrency Level: 300 Time taken for tests: 3.515 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 255000 bytes HTML transferred: 12000 bytes Requests per second: 284.50 [#/sec] (mean) Time per request: 1054.499 [ms] (mean) Time per request: 3.515 [ms] (mean, across all concurrent requests) Transfer rate: 70.85 [Kbytes/sec] received
Tornado Web Server:
Concurrency Level: 300 Time taken for tests: 1.907 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 168000 bytes HTML transferred: 12000 bytes Requests per second: 524.48 [#/sec] (mean) Time per request: 571.993 [ms] (mean) Time per request: 1.907 [ms] (mean, across all concurrent requests) Transfer rate: 86.05 [Kbytes/sec] received
What do these numbers mean?
Tornado Web Server can handle 1.84 times more requests than Apache + PHP server in a given time!
–Derrick
Our sponsors: