Phalconのサイトにも各種Frameworkのapache benchの結果が掲載されていますが、比較的速いCodeIgniterやFuelよりも3〜5倍多くのリクエストを捌いているようです。
ただ、Fhalconのサイトで使われているベンチマークコードは”Hello world!”を出力するという単純なものなので、DBを使ったコードで比較してみました。比較対象はFuelです。
結果的には、Fuelに比べ4倍程度多くのリクエストを捌いています。しかも今回のテストでは、FuelにはFailed requestsが発生してしまいました。
以下ベンチマークの結果です。なお、benchmarkにはapache benchを使用しています。
Phalcon
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking phalcon.local (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: Apache/2.2.22 Server Hostname: phalcon.local Server Port: 80 Document Path: /users/search Document Length: 1586 bytes Concurrency Level: 1 Time taken for tests: 12.566 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 2010000 bytes HTML transferred: 1586000 bytes Requests per second: 79.58 [#/sec] (mean) Time per request: 12.566 [ms] (mean) Time per request: 12.566 [ms] (mean, across all concurrent requests) Transfer rate: 156.20 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 5 12 1.0 13 22 Waiting: 5 12 1.0 12 21 Total: 5 12 1.0 13 22 WARNING: The median and mean for the processing time are not within a normal deviation These results are probably not that reliable. WARNING: The median and mean for the total time are not within a normal deviation These results are probably not that reliable. Percentage of the requests served within a certain time (ms) 50% 13 66% 13 75% 13 80% 13 90% 13 95% 13 98% 13 99% 13 100% 22 (longest request) |
Fuel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking fuel.local (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: Apache/2.2.22 Server Hostname: fuel.local Server Port: 80 Document Path: /users/ Document Length: 2153 bytes Concurrency Level: 1 Time taken for tests: 43.663 seconds Complete requests: 1000 Failed requests: 124 (Connect: 0, Receive: 0, Length: 124, Exceptions: 0) Write errors: 0 Total transferred: 2855870 bytes HTML transferred: 2152870 bytes Requests per second: 22.90 [#/sec] (mean) Time per request: 43.663 [ms] (mean) Time per request: 43.663 [ms] (mean, across all concurrent requests) Transfer rate: 63.87 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 27 44 8.8 43 72 Waiting: 27 43 8.8 43 72 Total: 27 44 8.8 43 72 Percentage of the requests served within a certain time (ms) 50% 43 66% 46 75% 49 80% 51 90% 58 95% 59 98% 61 99% 64 100% 72 (longest request) |