Skip to content

Instantly share code, notes, and snippets.

@zulfajuniadi
Last active December 29, 2015 13:49
Show Gist options
  • Save zulfajuniadi/e129cb9264ecab62c84c to your computer and use it in GitHub Desktop.
Save zulfajuniadi/e129cb9264ecab62c84c to your computer and use it in GitHub Desktop.
Benchmark Results PHP 56 vs PHP 70

PHP 56 vs PHP 70 Benchmark

Summary

  • Framework: Laravel 4.2.17
  • OS: Mac OSX 10.11.2
  • Model: MacBook Pro (Retina, Mid 2012)
  • Webserver: Apache 2.4.16
  • Configuration: mod_php
  • Processor: 2.3 GHz Intel Core i7
  • Memory: 8 GB 1600 MHz DDR3
  • Method: Apache Bench

Test route covers Routing, Session, Database and View Rendering

Results:

  • PHP56: 51.76 Req / Sec
  • PHP70: 177.43 Req / Sec

PHP70 is ~3.42 times faster

Details

Below are the details and test params:

$ php -v
PHP 5.6.16 (cli) (built: Dec 23 2015 15:39:37) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

$ ab -c 10 -n 1000 http://caresys.dev/auth/login

This is ApacheBench, Version 2.3 <$Revision: 1663405 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking caresys.dev (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.4.16
Server Hostname:        caresys.dev
Server Port:            80

Document Path:          /auth/login
Document Length:        1756 bytes

Concurrency Level:      10
Time taken for tests:   19.321 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      2403828 bytes
HTML transferred:       1756000 bytes
Requests per second:    51.76 [#/sec] (mean)
Time per request:       193.205 [ms] (mean)
Time per request:       19.321 [ms] (mean, across all concurrent requests)
Transfer rate:          121.50 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       1
Processing:    95  192  48.9    180     564
Waiting:       95  191  48.7    179     564
Total:         95  193  48.9    181     565

Percentage of the requests served within a certain time (ms)
  50%    181
  66%    191
  75%    199
  80%    207
  90%    222
  95%    240
  98%    397
  99%    454
 100%    565 (longest request)

PHP70

$ php -v
PHP 7.0.1 (cli) (built: Dec 29 2015 17:18:09) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

$ ab -c 10 -n 1000 http://caresys.dev/auth/login
This is ApacheBench, Version 2.3 <$Revision: 1663405 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking caresys.dev (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.4.16
Server Hostname:        caresys.dev
Server Port:            80

Document Path:          /auth/login
Document Length:        1756 bytes

Concurrency Level:      10
Time taken for tests:   5.636 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      2402204 bytes
HTML transferred:       1756000 bytes
Requests per second:    177.43 [#/sec] (mean)
Time per request:       56.359 [ms] (mean)
Time per request:       5.636 [ms] (mean, across all concurrent requests)
Transfer rate:          416.24 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       2
Processing:    19   56  49.0     40     350
Waiting:       19   56  49.0     40     350
Total:         19   56  49.0     40     350

Percentage of the requests served within a certain time (ms)
  50%     40
  66%     48
  75%     53
  80%     67
  90%     86
  95%    164
  98%    243
  99%    290
 100%    350 (longest request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment