avatar

Lachezar Grigorov

Full stack web and mobile developer

Welcome screen performance comparison Lumen vs Laravel vs Symfony vs CodeIgniter vs CakePHP vs Zend vs FuelPHP vs Slim vs PHPixie vs Fat-Free vs Express vs Hapi vs Koa vs Sails

Performance comparison between all relevant PHP and Node.js fremaworks this days. All tests are done in an real productive environment.  The welcome screen of each framework was the entry point for each test. A simple "Hello World" script was implemented for the frameworks without welcome screen.

Configuration

I use the same configuration as in "Performance comparison PHP vs Node.js"  to perform the tests.

Versions

  • Koa : 2.3.0
  • Express : 4.15.5
  • Hapi : 16.6.2
  • Fat-Free : 3.6
  • CodeIgniter : 3.1.6
  • Slim 3.0
  • Liumen 5.5
  • FuelPHP 1.8
  • Sails 0.12.14
  • Laravel 5.5
  • Zend 3.0
  • CakePHP 3.5
  • Symfony 3.3
  • PHPixie 3.3

 Tests

As I wrote at the biginning, the welcome screen of each framework was the entry point for each test. A simple "Hello World" script was implemented for the frameworks without welcome screen. Frameworks without welcome screen and extra implemented "Hello World" script may perform a little better results.

Here the list of the frameworks with extra implemented "Hello World" script:

  • Lumen
  • Slim
  • Fet-Free
  • Express
  • Koa
  • Hapi

Results

Lumen vs Laravel vs Symfony vs CodeIgniter vs CakePHP vs Zend vs FuelPHP vs Slim vs PHPixie vs Fat-Free vs Express vs Hapi vs Koa vs Sails

Lumen vs Laravel vs Symfony vs CodeIgniter vs CakePHP vs Zend vs FuelPHP vs Slim vs PHPixie vs Fat-Free vs Express vs Hapi vs Koa vs Sails

Koa

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:8000
Running 1m test @ http://localhost:8000
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 2.89ms 816.23us 29.22ms 95.27%
Req/Sec 8.78k 0.93k 9.83k 91.33%
524296 requests in 1.00m, 76.00MB read
Requests/sec: 8737.86
Transfer/sec: 1.27MB

Koa+Nginx

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:7000
Running 1m test @ http://localhost:7000
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 8.67ms 837.54us 26.85ms 85.10%
Req/Sec 2.90k 163.02 3.31k 79.50%
172995 requests in 1.00m, 30.18MB read
Requests/sec: 2882.96
Transfer/sec: 515.08KB

Express

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:8000
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 4.40ms 1.11ms 34.24ms 93.52%
Req/Sec 5.77k 651.84 6.70k 88.67%
344178 requests in 1.00m, 70.57MB read
Requests/sec: 5736.16
Transfer/sec: 1.18MB

Express + Nginx

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:7000
Running 1m test @ http://localhost:7000
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 9.37ms 1.95ms 48.47ms 92.71%
Req/Sec 2.69k 382.32 3.08k 87.67%
160641 requests in 1.00m, 37.68MB read
Requests/sec: 2677.03
Transfer/sec: 642.98KB

Hapi 

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:8000
Running 1m test @ http://localhost:8000
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 11.35ms 5.75ms 110.54ms 86.67%
Req/Sec 2.29k 369.49 2.78k 84.00%
136831 requests in 1.00m, 29.10MB read
Requests/sec: 2277.62
Transfer/sec: 496.00KB

Hapi + Nginx

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:7000
Running 1m test @ http://localhost:7000
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 17.23ms 4.88ms 66.03ms 86.39%
Req/Sec 1.47k 147.79 1.76k 72.83%
87727 requests in 1.00m, 21.25MB read
Requests/sec: 1461.91
Transfer/sec: 362.55KB

Fat - Free

Running 1m test @ http://localhost:3015
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 13.77ms 1.67ms 54.99ms 83.99%
Req/Sec 1.82k 156.71 2.12k 71.67%
108890 requests in 1.00m, 46.00MB read
Requests/sec: 1814.81
Transfer/sec: 785.03KB

CodeIgniter

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:3009
Running 1m test @ http://localhost:3009
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 17.91ms 2.49ms 57.68ms 85.39%
Req/Sec 1.40k 154.54 1.62k 70.50%
83763 requests in 1.00m, 834.31MB read
Requests/sec: 1395.95
Transfer/sec: 13.90MB

Slim

Running 1m test @ http://localhost:3013
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 24.55ms 2.50ms 52.72ms 82.51%
Req/Sec 1.02k 90.77 1.12k 75.17%
61071 requests in 1.00m, 10.66MB read
Requests/sec: 1017.76
Transfer/sec: 181.84KB

Lumen

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:3006
Running 1m test @ http://localhost:3006
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 26.45ms 7.43ms 234.42ms 98.31%
Req/Sec 0.96k 82.45 1.07k 71.91%
57294 requests in 1.00m, 12.78MB read
Requests/sec: 954.72
Transfer/sec: 218.12KB

FuelPHP

Running 1m test @ http://localhost:3012
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 60.67ms 13.14ms 479.00ms 95.37%
Req/Sec 416.67 52.72 676.00 73.08%
24876 requests in 1.00m, 688.62MB read
Requests/sec: 413.92
Transfer/sec: 11.46MB

Sails

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:8000
Running 1m test @ http://localhost:8000
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 75.77ms 16.64ms 186.68ms 88.84%
Req/Sec 332.10 55.34 424.00 73.62%
19825 requests in 1.00m, 207.23MB read
Requests/sec: 330.35
Transfer/sec: 3.45MB

Sails + Nginx

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:7000
Running 1m test @ http://localhost:7000
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 80.58ms 15.51ms 199.03ms 92.39%
Req/Sec 314.88 109.99 505.00 73.17%
18650 requests in 1.00m, 195.48MB read
Requests/sec: 310.67
Transfer/sec: 3.26MB

Laravel without middleware (To perfom this test I commented all middlewares and web middlewares in Kernel.php and I did "php artisan config:cache" too.)

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:3007
Running 1m test @ http://localhost:3007
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 107.33ms 10.21ms 167.89ms 71.86%
Req/Sec 233.62 21.16 292.00 69.17%
13971 requests in 1.00m, 33.92MB read
Requests/sec: 232.64
Transfer/sec: 578.40KB

Zend

Running 1m test @ http://localhost:3011
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 110.94ms 21.57ms 179.97ms 71.25%
Req/Sec 225.88 43.08 292.00 48.17%
13511 requests in 1.00m, 72.99MB read
Requests/sec: 225.04
Transfer/sec: 1.22MB

CakePHP

root@localhost:~# curl http://localhost:3010
Running 1m test @ http://localhost:3010
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 120.65ms 17.04ms 373.21ms 81.67%
Req/Sec 208.74 28.28 320.00 83.28%
12439 requests in 1.00m, 99.94MB read
Requests/sec: 207.19
Transfer/sec: 1.66MB

Symfony

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:3008
Running 1m test @ http://localhost:3008
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 142.57ms 28.48ms 230.84ms 59.21%
Req/Sec 175.80 35.70 242.00 59.33%
10512 requests in 1.00m, 48.27MB read
Requests/sec: 175.13
Transfer/sec: 823.41KB

Laravel

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:3007
Running 1m test @ http://localhost:3007
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 195.78ms 130.39ms 1.97s 95.14%
Req/Sec 137.61 38.24 202.00 77.28%
7994 requests in 1.00m, 25.09MB read
Socket errors: connect 0, read 0, write 0, timeout 16
Requests/sec: 133.10
Transfer/sec: 427.77KB

PHPixie

root@localhost:~# wrk -t1 -c25 -d1m http://localhost:3014
Running 1m test @ http://localhost:3014
1 threads and 25 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 204.98ms 24.82ms 331.80ms 71.17%
Req/Sec 122.25 17.91 181.00 69.50%
7311 requests in 1.00m, 7.37MB read
Requests/sec: 121.74
Transfer/sec: 125.66KB