You get a bonus - 1 coin for daily activity. Now you have 1 coin

PHP Framework Performance Comparison

Lecture



Case

Test Simple "Hello World" page output, Simple MVC logic(Router -> Controller -> Viewer), No Database Connections, No complex logic.

Hardware platform
CPU: Intel Core i5 750 (2.67GHz x4)
RAM: 4GB

Software Environment

Debian 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

* zf: Zend Framework
Site: http://framework.zend.com
Ver: 1.11.11

* zf2: Zend Framework
Site: http://framework.zend.com
Site: https://github.com/zendframework/ZendSkeletonApplication
Ver: 2.0.0-beta1

* symfony: symfony
Site: http://www.symfony-project.org
Ver: 2.0.0

* cakephp: CakePHP
Site: http://cakephp.org
Ver: 2.0.4

* ci: CodeIgniter
Site: http://codeigniter.com
Ver: 2.1.0

* yii: Yii Framework
Site: http://www.yiiframework.com
Ver: 1.1.8

* micromvc4: MicroMVC
Site: http://www.micromvc.com
Ver: 4.0.0

* laravel: Laravel, A PHP Framework For Web Artisans
Site: http://laravel.com
Ver: 2.0.2

* slim: Slim Framework
Site: http://www.slimframework.com
Ver: 1.5.0

* yaf: Yet Another Framework in PHP Extension
Site: http://code.google.com/p/yafphp
Ver: 2.1.3-beta (yaf.cache_config=1)

* FuelPHP: Simple, Flexible, Community driven Web Framework
Site: http://fuelphp.com/
Ver: 1.1

* ColaPHP:
Site: http://code.google.com/p/colaphp/
Ver: 1.2-ga

# XHProf: A Hierarchical Profiler for PHP
Site: http://pecl.php.net/xhprof
Ver: 0.9.2

# The source code of this testing:
Source: https://github.com/eryx/php-framework-benchmark

1. Apache Benchmark

Requests pre second (-c 100 -n 30000), the bigger is better

PHP Framework Performance ComparisonPHP Framework Performance Comparison

2. System LoadAvg
System LoadAvg in 1 Minute when Apache Benchmark Complete,
the smaller is better (-c 100 -n 30000)
PHP Framework Performance Comparison

3. Memory usage
How many memory usage in one "hello world" page. the smaller is better.
PHP Framework Performance Comparison

4. Response time
The time of page request to response.PHP Framework Performance Comparison

5. Number of function calls (Facebook XHProf)
The number of functions calls in one "hello world" page.
PHP Framework Performance Comparison

The detail of function calls map

Symfony2 PHP Framework Performance Comparison Zend Framework 1.11.1 PHP Framework Performance Comparison
Zend Framework 2.0.0-beta1 PHP Framework Performance Comparison CakePHP 2.0.4 PHP Framework Performance Comparison
CodeIgniter 2.1.0 PHP Framework Performance Comparison Yii Framework 1.1.8 PHP Framework Performance Comparison
Slim 1.5 PHP Framework Performance Comparison Laravel 2.0.2 PHP Framework Performance Comparison
MicroMVC 4.0.0 PHP Framework Performance Comparison Yaf 2.1.3-beta PHP Framework Performance Comparison
FuelPHP 1.1 PHP Framework Performance Comparison ColaPHP 1.2 PHP Framework Performance Comparison

6. Number of Files

The number of files included or required in one "hello world" page. the smaller is better.
PHP Framework Performance Comparison


Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Running server side scripts using PHP as an example (LAMP)

Terms: Running server side scripts using PHP as an example (LAMP)