Measured the simplest performance of the Django, flask, bottle, Tornado frameworks themselves. Completely silent about Django's performance.
Django, flask, bottle all use Gunicorn+gevent startup, single process, and turn off debug, the request returns only one string OK.
Tornado, the other content is consistent.
The test software is siege, the test OS is CENOS6 64 bits, the test command is:
Copy Code code as follows:
Siege-c 100-r 100-b http://127.0.0.1:5000/
The Django test results are:
Copy Code code as follows:
transactions:10000 Hits
availability:100.00%
Elapsed time:18.51 secs
Data transferred:0.02 MB
Response time:0.18 secs
Transaction rate:540.25 trans/sec
throughput:0.00 mb/sec
concurrency:99.35
Successful transactions:10000
Failed transactions:0
Longest transaction:0.30
Shortest transaction:0.12
Django (remove all middleware) test results are:
Copy Code code as follows:
transactions:10000 Hits
availability:100.00%
Elapsed time:12.97 secs
Data transferred:0.02 MB
Response time:0.13 secs
Transaction rate:771.01 trans/sec
throughput:0.00 mb/sec
concurrency:99.41
Successful transactions:10000
Failed transactions:0
Longest transaction:0.28
Shortest transaction:0.12
Flask test Results are:
Copy Code code as follows:
transactions:10000 Hits
availability:100.00%
Elapsed time:5.47 secs
Data transferred:0.02 MB
Response time:0.05 secs
Transaction rate:1828.15 trans/sec
throughput:0.00 mb/sec
concurrency:96.25
Successful transactions:10000
Failed transactions:0
Longest transaction:0.11
Shortest transaction:0.00
Bottle test results are:
Copy Code code as follows:
transactions:10000 Hits
availability:100.00%
Elapsed time:4.55 secs
Data transferred:0.02 MB
Response time:0.04 secs
Transaction rate:2197.80 trans/sec
throughput:0.00 mb/sec
concurrency:96.81
Successful transactions:10000
Failed transactions:0
Longest transaction:0.09
Shortest transaction:0.00
Tornado test Results are:
Copy Code code as follows:
transactions:10000 Hits
availability:100.00%
Elapsed time:7.06 secs
Data transferred:0.02 MB
Response time:0.07 secs
Transaction rate:1416.43 trans/sec
throughput:0.00 mb/sec
concurrency:99.51
Successful transactions:10000
Failed transactions:0
Longest transaction:0.09
Shortest transaction:0.01
The performance of the visible pure frame itself is:
Copy Code code as follows:
Bottle > Flask > Tornado > Django
Practical use:
Tornado uses an asynchronous drive, so when writing business code, a slight synchronization time consuming performance drops dramatically;
Bottle need to achieve too much of their own, coupled with the later do not know what the performance will be;
Flask performance is slightly close, but the surrounding support has been very rich;
Django does not say, performance has been unable to see, the only advantage is that the development of the shelves have been set up, the development of a lot faster
Because recently is worrying about a project selection, so it was measured, recorded here.
PS:2014-6-23 uses CENTOS6 64-bit to test again to produce a more matching result with the production environment and modifies the article.