无论是性能,还是部署启动方式
这是网上搜索到的一个测试比较结果 https://gist.github.com/torbjon/4286777
这是自己的 sinatra + datamapper 小应用测试结果.
测试命令ab -c 10 -n 1000 http://127.0.0.1:9292/c/11
thin 结果
Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: thin
Server Hostname: 127.0.0.1
Server Port: 9292
Document Path: /c/11
Document Length: 8426 bytes
Concurrency Level: 10
Time taken for tests: 50.289 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 8664000 bytes
HTML transferred: 8426000 bytes
Requests per second: 19.89 [#/sec] (mean)
Time per request: 502.890 [ms] (mean)
Time per request: 50.289 [ms] (mean, across all concurrent requests)
Transfer rate: 168.25 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 3
Processing: 131 502 112.9 501 884
Waiting: 41 413 116.4 451 597
Total: 131 502 112.9 501 884
Percentage of the requests served within a certain time (ms)
50% 501
66% 534
75% 550
80% 572
90% 633
95% 720
98% 765
99% 853
100% 884 (longest request)
puma 结果
Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software:
Server Hostname: 127.0.0.1
Server Port: 9292
Document Path: /c/11
Document Length: 8426 bytes
Concurrency Level: 10
Time taken for tests: 61.425 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 8620000 bytes
HTML transferred: 8426000 bytes
Requests per second: 16.28 [#/sec] (mean)
Time per request: 614.251 [ms] (mean)
Time per request: 61.425 [ms] (mean, across all concurrent requests)
Transfer rate: 137.04 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 385 613 102.6 608 1465
Waiting: 385 611 102.4 605 1465
Total: 385 613 102.6 608 1465
Percentage of the requests served within a certain time (ms)
50% 608
66% 650
75% 676
80% 693
90% 735
95% 783
98% 831
99% 869
100% 1465 (longest request)
结果是 thin 的总时间比 puma 要少 10 秒