Fastest framework?

Its good to to know there is an other php framework, but your chart seems missing some frameworks like doophp, cake php, symphony and much more. And also the datas are intresting, i was able to generate 3600-3800 request/second with Codeigniter using the ApacheBench tool for statistic, and DooPHP can do even more something like 7000-7300 request/second, can you share how you tested the perfomance?



9.7k

None sense to compare with different circumstance. You can setup Phalcon in your workstation and get the result that you just want.



1.6k

Yes, it is none sense to compare with different circumstance.

But, If you still want to see my benchmark, see http://blog.a-way-out.net/blog/2014/11/27/php-framework-benchmark/

Sorry it was written in Japanese. But what you should see is only graphs or a table.

@kenjis: It's no problem, i can use ab too and little bit i can understand the japan kanji. I just can't understand what maked they wrong, I runned the benchark too, here is the result:

[email protected]:~$ ab -c 10 -t 3 http://localhost/benchmark/Codeigniter3/index.php This is ApacheBench, Version 2.3 <$Revision: 1528965 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient) Completed 5000 requests Completed 10000 requests Completed 15000 requests Completed 20000 requests Completed 25000 requests Completed 30000 requests Finished 32431 requests

Server Software: Apache/2.4.7 Server Hostname: localhost Server Port: 80

Document Path: /benchmark/Codeigniter3/index.php Document Length: 304 bytes

Concurrency Level: 10 Time taken for tests: 3.000 seconds Complete requests: 32431 Failed requests: 0 Non-2xx responses: 32434 Total transferred: 15665622 bytes HTML transferred: 9859936 bytes Requests per second: 10810.11 [#/sec] (mean) Time per request: 0.925 [ms] (mean) Time per request: 0.093 [ms] (mean, across all concurrent requests) Transfer rate: 5099.38 [Kbytes/sec] received

Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.1 0 4 Processing: 0 1 0.3 1 10 Waiting: 0 0 0.2 0 10 Total: 0 1 0.3 1 10

Percentage of the requests served within a certain time (ms) 50% 1 66% 1 75% 1 80% 1 90% 1 95% 1 98% 1 99% 2 100% 10 (longest request)

So the script maked 10810.11 response per sec. If I turn on the cache, then the result will be:

[email protected]:~$ ab -c 10 -t 3 http://localhost/benchmark/Codeigniter3/index.php This is ApacheBench, Version 2.3 <$Revision: 1528965 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient) Completed 5000 requests Completed 10000 requests Completed 15000 requests Completed 20000 requests Completed 25000 requests Completed 30000 requests Completed 35000 requests Completed 40000 requests Finished 40614 requests

Server Software: Apache/2.4.7 Server Hostname: localhost Server Port: 80

Document Path: /benchmark/Codeigniter3/index.php Document Length: 304 bytes

Concurrency Level: 10 Time taken for tests: 3.000 seconds Complete requests: 40614 Failed requests: 0 Non-2xx responses: 40616 Total transferred: 19617528 bytes HTML transferred: 12347264 bytes Requests per second: 13537.65 [#/sec] (mean) Time per request: 0.739 [ms] (mean) Time per request: 0.074 [ms] (mean, across all concurrent requests) Transfer rate: 6385.75 [Kbytes/sec] received

Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.1 0 2 Processing: 0 0 0.2 0 8 Waiting: 0 0 0.1 0 6 Total: 0 1 0.2 1 9

Percentage of the requests served within a certain time (ms) 50% 1 66% 1 75% 1 80% 1 90% 1 95% 1 98% 1 99% 1 100% 9 (longest request)

The script maked 13537.65 request per sec. So something went wrong with the benchmark :) The test was the same "Hello World" test.



11.1k
edited Feb '15

It totally depends on your needs and cache configuration.

Do the tests itself for your needs! Grab your working database, write some small typical use-case on framework and check out time/memory consumption. Other tests will be useless for real life.

Typical "Hello World App" will be faster (see in official Phalcon docs).


Note: IMHO

As of my experience, can compare Yii1 and Phalcon + Incubator. Usecases: hundreds millions of rows in db with relations and get/set convertation, API and CLI apps. I'm testing APIs with Yandex.Tank ( http://yandextank.readthedocs.org ) or siege just because thay can be scripted to use cookies and other user logic for concrete application + stats from zabbix/pinba.

Speed difference between Phalcon + Incubator and Yii1 (both with APC) is small for execution time (about 7-10%) in 95% of all working time.

But Yii1 needs 5x RAM than Phalcon for same situation (or 2x RAM if using models without populate).

I think, that if you have bottlneck in database queries (or in logic they have been written), changing framework will not solve your problem at all.



1.6k

See Code Block in http://forum.phalconphp.com/help/markdown You can write output that is easy to read for humans.

What's wrong with your benchmarks? It seems okay to me.

And what's cache? You mean PHP OPcache?



1.6k

I've updated my benchmarks.

PHP Framework Benchmarks for 2015 http://blog.a-way-out.net/blog/2015/03/27/php-framework-benchmark/