Skip to content

Commit 86b0adb

Browse files
committed
Update README and results
1 parent 56594fc commit 86b0adb

File tree

3 files changed

+73
-53
lines changed

3 files changed

+73
-53
lines changed

README.md

Lines changed: 49 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This is `master` branch.
2020
* With minimum changes to run this benchmark.
2121
* Set environment production/Turn off debug mode.
2222
* Run optimization which you normally do in your production environment, like composer's `--optimize-autoloader`.
23-
* Use controller class if a framework supports.
23+
* Use controller or action class if a framework has the functionality.
2424

2525
Some people may think using default configuration is not fair. But I think a framework's default configuration is an assertion of what it is. Default configuration is a good starting point to know a framework. And I can't optimize all the frameworks. Some frameworks are optimized, some are not, it is not fair. So I don't remove any components/configurations.
2626

@@ -32,26 +32,26 @@ If you find something wrong with my code, please feel free to send Pull Requests
3232

3333
1. Phalcon 2.0.8
3434
1. Ice 1.0.34
35-
1. FatFree 3.5.0 (Comming Soon)
35+
1. FatFree 3.5.0
3636
1. Slim 2.6.2
37-
1. CodeIgniter 3.0.0
37+
1. CodeIgniter 3.0.2
3838
1. NoFussFramework 1.2.3
3939
1. Slim 3.0.0-RC1
4040
1. BEAR.Sunday 1.0.1
41+
1. Lumen 5.1.5
4142
1. zend-expressive 1.0.0rc2 (FastRoute + zend-servicemanager)
4243
1. Radar 1.0.0-dev
4344
1. Yii 2.0.6
44-
1. Lumen 5.0.8
4545
1. Silex 1.3.4
4646
1. Cygnite 1.3.1
4747
1. FuelPHP 1.8-dev
48-
1. PHPixie 3.2 (Comming Soon)
48+
1. PHPixie 3.2
4949
1. Aura 2.0.2
50-
1. CakePHP 3.1.1
50+
1. CakePHP 3.1.2
5151
1. Symfony 2.7.5
5252
1. Laravel 5.1.19
53-
1. Zend Framework 2.4.0
54-
1. TYPO3 Flow 2.3.6
53+
1. Zend Framework 2.5.2
54+
1. TYPO3 Flow 3.0.0
5555

5656
## Results
5757

@@ -66,53 +66,62 @@ If you find something wrong with my code, please feel free to send Pull Requests
6666

6767
These are my benchmarks, not yours. **I encourage you to run on your environments.**
6868

69-
(2015/10/22)
69+
(2015/10/28)
7070

71-
![Benchmark Results Graph](https://pbs.twimg.com/media/CR6F0mKUYAAzOJE.png)
71+
![Benchmark Results Graph](https://pbs.twimg.com/media/CSXXvggUYAA74_j.png)
7272

7373
|framework |requests per second|relative|peak memory|relative|
7474
|-------------------|------------------:|-------:|----------:|-------:|
75-
|phalcon-2.0 | 1,523.55| 38.2| 0.50| 1.0|
76-
|ice-1.0 | 1,275.87| 32.0| 0.50| 1.0|
77-
|slim-2.6 | 812.56| 20.4| 0.50| 1.0|
78-
|codeigniter-3.0 | 732.62| 18.4| 0.50| 1.0|
79-
|nofuss-1.2 | 632.46| 15.9| 0.50| 1.0|
80-
|slim-3.0 | 567.68| 14.2| 0.75| 1.5|
81-
|bear-1.0 | 472.28| 11.9| 1.00| 2.0|
82-
|ze-1.0 | 395.13| 9.9| 1.00| 2.0|
83-
|radar-1.0-dev | 376.21| 9.4| 0.75| 1.5|
84-
|yii-2.0 | 393.89| 9.9| 1.75| 3.5|
85-
|lumen-5.0 | 363.65| 9.1| 1.25| 2.5|
86-
|silex-1.3 | 356.55| 8.9| 1.00| 2.0|
87-
|cygnite-1.3 | 353.72| 8.9| 1.00| 2.0|
88-
|fuel-1.8-dev | 321.57| 8.1| 0.75| 1.5|
89-
|aura-2.0 | 210.10| 5.3| 1.00| 2.0|
90-
|cake-3.1 | 215.51| 5.4| 1.50| 3.0|
91-
|symfony-2.7 | 100.22| 2.5| 3.25| 6.5|
92-
|laravel-5.1 | 95.87| 2.4| 2.75| 5.5|
93-
|zf-2.4 | 72.16| 1.8| 3.25| 6.5|
94-
|typo3-flow-2.3 | 39.85| 1.0| 5.50| 11.0|
75+
|phalcon-2.0 | 1,470.10| 56.0| 0.50| 1.0|
76+
|ice-1.0 | 1,230.86| 46.9| 0.50| 1.0|
77+
|fatfree-3.5 | 948.76| 36.2| 0.50| 1.0|
78+
|slim-2.6 | 749.78| 28.6| 0.50| 1.0|
79+
|ci-3.0 | 687.84| 26.2| 0.50| 1.0|
80+
|nofuss-1.2 | 596.83| 22.7| 0.50| 1.0|
81+
|slim-3.0 | 534.92| 20.4| 0.75| 1.5|
82+
|bear-1.0 | 418.27| 15.9| 1.00| 2.0|
83+
|lumen-5.1 | 387.59| 14.8| 1.00| 2.0|
84+
|ze-1.0 | 353.47| 13.5| 1.00| 2.0|
85+
|radar-1.0-dev | 355.74| 13.6| 0.75| 1.5|
86+
|yii-2.0 | 351.31| 13.4| 1.75| 3.5|
87+
|silex-1.3 | 316.28| 12.1| 1.00| 2.0|
88+
|cygnite-1.3 | 324.87| 12.4| 1.00| 2.0|
89+
|fuel-1.8-dev | 301.30| 11.5| 0.75| 1.5|
90+
|phpixie-3.2 | 253.21| 9.6| 1.50| 3.0|
91+
|aura-2.0 | 198.16| 7.6| 1.00| 2.0|
92+
|cake-3.1 | 202.34| 7.7| 1.50| 3.0|
93+
|symfony-2.7 | 88.22| 3.4| 3.25| 6.5|
94+
|laravel-5.1 | 80.09| 3.1| 2.75| 5.5|
95+
|zf-2.5 | 69.57| 2.7| 3.25| 6.5|
96+
|typo3f-3.0 | 26.24| 1.0| 6.75| 13.5|
9597

9698
Note(1): All the results are run on php with `phalcon.so` and `ice.so`. If you don't load phalcon.so or ice.so, the rps except for Phalcon or Ice probably increase a bit.
9799

98100
## How to Benchmark
99101

100-
Install source code as <http://localhost/php-framework-benchmark/>.
102+
Install source code as <http://localhost/php-framework-benchmark/>:
101103

102104
~~~
103105
$ git clone https://github.com/kenjis/php-framework-benchmark.git
104106
$ cd php-framework-benchmark
105107
$ sh setup.sh
106108
~~~
107109

108-
Run benchmarks.
110+
Run benchmarks:
109111

110112
~~~
111113
$ sh benchmark.sh
112114
~~~
113115

114116
See <http://localhost/php-framework-benchmark/>.
115117

118+
If you want to benchmark some frameworks:
119+
120+
~~~
121+
$ sh setup.sh fatfree-3.5/ slim-3.0/ lumen-5.1/ silex-1.3/
122+
$ sh benchmark.sh fatfree-3.5/ slim-3.0/ lumen-5.1/ silex-1.3/
123+
~~~
124+
116125
## Linux Kernel Configuration
117126

118127
I added below in `/etc/sysctl.conf`
@@ -131,6 +140,14 @@ and run `sudo sysctl -p`.
131140

132141
If you want to see current configuration, run `sudo sysctl -a`.
133142

143+
## Apache Virtual Host Configuration
144+
145+
~~~
146+
<VirtualHost *:80>
147+
DocumentRoot /home/vagrant/public
148+
</VirtualHost>
149+
~~~
150+
134151
## Reference
135152

136153
* [Phalcon](http://phalconphp.com/) ([@phalconphp](https://twitter.com/phalconphp))

list.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ symfony-2.7
3434
laravel-5.1
3535
#zf-2.4
3636
zf-2.5
37-
typo3f-2.3
37+
#typo3f-2.3
38+
typo3f-3.0
3839
"

output/results.hello_world.log

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
phalcon-2.0: 1523.55: 524288: 0.000770
2-
ice-1.0: 1275.87: 524288: 0.001496
3-
slim-2.6: 812.56: 524288: 0.001856
4-
codeigniter-3.0: 732.62: 524288: 0.001282
5-
nofuss-1.2: 632.46: 524288: 0.002218
6-
slim-3.0: 567.68: 786432: 0.002767
7-
bear-1.0: 472.28: 1048576: 0.002281
8-
ze-1.0: 395.13: 1048576: 0.003291
9-
radar-1.0-dev: 376.21: 786432: 0.002589
10-
yii-2.0: 393.89: 1835008: 0.002833
11-
lumen-5.0: 363.65: 1310720: 0.002389
12-
silex-1.3: 356.55: 1048576: 0.002992
13-
cygnite-1.3: 353.72: 1048576: 0.002851
14-
fuel-1.8-dev: 321.57: 786432: 0.002657
15-
aura-2.0: 210.10: 1048576: 0.006897
16-
cake-3.1: 215.51: 1572864: 0.003659
17-
symfony-2.7: 100.22: 3407872: 0.010020
18-
laravel-5.1: 95.87: 2883584: 0.019425
19-
zf-2.4: 72.16: 3407872: 0.027408
20-
typo3-flow-2.3: 39.85: 5767168: 0.053699
1+
phalcon-2.0: 1470.10: 524288: 0.000710: 6
2+
ice-1.0: 1230.86: 524288: 0.001375: 5
3+
fatfree-3.5: 948.76: 524288: 0.001792: 10
4+
slim-2.6: 749.78: 524288: 0.002052: 25
5+
ci-3.0: 687.84: 524288: 0.002292: 27
6+
nofuss-1.2: 596.83: 524288: 0.001675: 22
7+
slim-3.0: 534.92: 786432: 0.001692: 57
8+
bear-1.0: 418.27: 1048576: 0.001318: 99
9+
lumen-5.1: 387.59: 1048576: 0.004704: 32
10+
ze-1.0: 353.47: 1048576: 0.004015: 68
11+
radar-1.0-dev: 355.74: 786432: 0.002665: 74
12+
yii-2.0: 351.31: 1835008: 0.002830: 50
13+
silex-1.3: 316.28: 1048576: 0.003643: 65
14+
cygnite-1.3: 324.87: 1048576: 0.002614: 71
15+
fuel-1.8-dev: 301.30: 786432: 0.003641: 45
16+
phpixie-3.2: 253.21: 1572864: 0.003477: 167
17+
aura-2.0: 198.16: 1048576: 0.005190: 69
18+
cake-3.1: 202.34: 1572864: 0.004083: 85
19+
symfony-2.7: 88.22: 3407872: 0.018519: 107
20+
laravel-5.1: 80.09: 2883584: 0.022332: 40
21+
zf-2.5: 69.57: 3407872: 0.048966: 205
22+
typo3f-3.0: 26.24: 7077888: 0.057868: 278

0 commit comments

Comments
 (0)