Just for your information I have compared the web2py running default Rocket 
http server and Tornado (using anyserver.py). Is very simple benchmark using 
ApacheBench and accessing page from standard web2py examples.
Tests were running on WindowsXP, Python 2.7.2. and lastest web2py 1.96.4


####### Here we have default web2py running Rocket
Server Software:        Rocket
Server Hostname:        127.0.0.1
Server Port:            8000

Document Path:          /examples/simple_examples/hello5.html
Document Length:        179 bytes

Concurrency Level:      30
Time taken for tests:   4.953 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      59800 bytes
HTML transferred:       17900 bytes
Requests per second:    20.19 [#/sec] (mean)
Time per request:       1485.938 [ms] (mean)
Time per request:       49.531 [ms] (mean, across all concurrent requests)
Transfer rate:          11.79 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   49 146.4      0     500
Processing:    47 1289 435.9   1453    1922
Waiting:       47  860 383.3    953    1516
Total:         47 1338 436.5   1453    2016


####### Here we have web2py running via Tornado using anyserver.py (running 
Tornado from trunk ... so the latest one)
Server Software:        TornadoServer/2.0rc1
Server Hostname:        localhost
Server Port:            8080

Document Path:          /examples/simple_examples/hello5.html
Document Length:        179 bytes

Concurrency Level:      30
Time taken for tests:   1.797 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      53700 bytes
HTML transferred:       17900 bytes
Requests per second:    55.65 [#/sec] (mean)
Time per request:       539.063 [ms] (mean)
Time per request:       17.969 [ms] (mean, across all concurrent requests)
Transfer rate:          29.18 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.6      0      16
Processing:   125  508 152.1    563     969
Waiting:       63  461 142.2    516     578
Total:        125  509 151.8    563     969

More tests show that by increasing the number of concurent users the Tornado 
becomes 2x or more faster. Not sure about overall .. real world ... 
stability, but simply runnng web2py with different http server you can 
increase application responsivness. Does anyone have any real world 
experience with running web2py using Tornado? Is it stable? Any potential 
disadvantages?

David


Reply via email to