Hardware platform
CPU: Intel Core i5 750 (2.67GHz x4)
RAM: 4GBSoftware EnvironmentDebian 6.0.4 x86_64 (2.6.32-41)apache 2.2.16 (mpm-prefork,mod-php5)php 5.3.10
php-apc 3.1.9 (Optimization for include/require)Copy all projects to /dev/shm/* (Optimization for files read/write)Frameworks list* zf2: Zend Framework
Site: http://framework.zend.com
Site: https://github.com/zendframework/ZendSkeletonApplication
Ver: 2.0.0-beta1* yaf: Yet Another Framework in PHP Extension
Site: http://code.google.com/p/yafphp
Ver: 2.1.3-beta (yaf.cache_config=1)# The source code of this testing:
Source: https://github.com/eryx/php-framework-benchmark1. Apache BenchmarkRequests pre second (-c 100 -n 30000), the bigger is better
Requests pre second (-c 200 -n 50000), the bigger is better
2. System LoadAvg
System LoadAvg in 1 Minute when Apache Benchmark Complete,
the smaller is better (-c 100 -n 30000)
3. Memory usage
How many memory usage in one "hello world" page. the smaller is better.
4. Response time
The time of page request to response.
5. Number of function calls (Facebook XHProf)
The number of functions calls in one "hello world" page.
The detail of function calls map
Symfony2 Zend Framework 1.11.1 Zend Framework 2.0.0-beta1 CakePHP 2.0.4 CodeIgniter 2.1.0 Yii Framework 1.1.8 Slim 1.5 Laravel 2.0.2 MicroMVC 4.0.0 Yaf 2.1.3-beta FuelPHP 1.1 ColaPHP 1.2 6. Number of Files
The number of files included or required in one "hello world" page. the smaller is better.
And this is more complex test from various framework.
And another benchmark "Hello World" test, but this time we sent 2000 requests using 10 concurrent connections to each framework.
And another benchmark "Hello World" test, but this time we sent 2000 requests using 10 concurrent connections to each framework.
From various independent benchmark reports, you can see C based framework (represented by Yaf and Phalcon) has a higher and better results than PHP based framework.
0 comments:
Post a Comment