thinkphp 与 tornado 性能测试比较

测试标准:单线程,请求均只返回一个字符串ok。

测试工具


siege

命令

siege -c 并发数 -r 次数 -b 网址

100并发 执行1次


thinkphp 报告

Transactions:                100 hits
Availability:             100.00 %
Elapsed time:               0.58 secs
Data transferred:           0.22 MB
Response time:              0.29 secs
Transaction rate:         172.41 trans/sec
Throughput:             0.37 MB/sec
Concurrency:               50.10
Successful transactions:           0
Failed transactions:               0
Longest transaction:            0.54
Shortest transaction:           0.00

tornado报告

Transactions:                100 hits
Availability:             100.00 %
Elapsed time:               0.12 secs
Data transferred:           0.00 MB
Response time:              0.05 secs
Transaction rate:         833.33 trans/sec
Throughput:             0.00 MB/sec
Concurrency:               38.58
Successful transactions:         100
Failed transactions:               0
Longest transaction:            0.08
Shortest transaction:           0.00

可以看出 tornado执行速度是thinkphp的 4.8倍 左右

100并发 执行10次


thinkphp 报告

Transactions:               1000 hits
Availability:             100.00 %
Elapsed time:               6.81 secs
Data transferred:           2.17 MB
Response time:              0.65 secs
Transaction rate:         146.84 trans/sec
Throughput:             0.32 MB/sec
Concurrency:               95.88
Successful transactions:           0
Failed transactions:               0
Longest transaction:            1.23
Shortest transaction:           0.00

tornado报告

Transactions:               1000 hits
Availability:             100.00 %
Elapsed time:               1.26 secs
Data transferred:           0.00 MB
Response time:              0.12 secs
Transaction rate:         793.65 trans/sec
Throughput:             0.00 MB/sec
Concurrency:               94.83
Successful transactions:        1000
Failed transactions:               0
Longest transaction:            0.17
Shortest transaction:           0.00

可以看出 tornado执行速度是thinkphp的 5.4倍 左右

100并发 执行100次


thinkphp 报告

Transactions:              10000 hits
Availability:             100.00 %
Elapsed time:              55.48 secs
Data transferred:          21.69 MB
Response time:              0.52 secs
Transaction rate:         180.25 trans/sec
Throughput:             0.39 MB/sec
Concurrency:               93.24
Successful transactions:           0
Failed transactions:               0
Longest transaction:            1.31
Shortest transaction:           0.00

tornado 性能

Transactions:              10000 hits
Availability:             100.00 %
Elapsed time:              13.27 secs
Data transferred:           0.02 MB
Response time:              0.13 secs
Transaction rate:         753.58 trans/sec
Throughput:             0.00 MB/sec
Concurrency:               99.10
Successful transactions:       10000
Failed transactions:               0
Longest transaction:            0.72
Shortest transaction:           0.01

可以看出 tornado执行速度是thinkphp的 4倍 左右

1000并发 执行1次


thinkphp 报告

Transactions:               1000 hits
Availability:             100.00 %
Elapsed time:              12.13 secs
Data transferred:           2.17 MB
Response time:              0.25 secs
Transaction rate:          82.44 trans/sec
Throughput:             0.18 MB/sec
Concurrency:               20.27
Successful transactions:           0
Failed transactions:               0
Longest transaction:            0.86
Shortest transaction:           0.00

tornado 报告

Transactions:               1000 hits
Availability:             100.00 %
Elapsed time:              11.35 secs
Data transferred:           0.00 MB
Response time:              0.00 secs
Transaction rate:          88.11 trans/sec
Throughput:             0.00 MB/sec
Concurrency:                0.15
Successful transactions:        1000
Failed transactions:               0
Longest transaction:            0.03
Shortest transaction:           0.00

性能差不多

1000并发 执行100次


thinkphp 报告

Transactions:               2294 hits
Availability:              58.79 %
Elapsed time:              49.71 secs
Data transferred:           4.97 MB
Response time:              3.05 secs
Transaction rate:          46.15 trans/sec
Throughput:             0.10 MB/sec
Concurrency:              140.90
Successful transactions:           0
Failed transactions:            1608
Longest transaction:           16.64
Shortest transaction:           0.00

tornado报告

Transactions:               5416 hits
Availability:              77.21 %
Elapsed time:              40.34 secs
Data transferred:           0.01 MB
Response time:              0.87 secs
Transaction rate:         134.26 trans/sec
Throughput:             0.00 MB/sec
Concurrency:              116.89
Successful transactions:        5416
Failed transactions:            1599
Longest transaction:           14.56
Shortest transaction:           0.00

tornado的效率是thinkphp 的2倍多

你可能感兴趣的:(thinkphp 与 tornado 性能测试比较)