Skip to content

Instantly share code, notes, and snippets.

@brandonkelly
Last active February 13, 2017 14:30
Show Gist options
  • Save brandonkelly/65adaaea41582463954997807a7e9665 to your computer and use it in GitHub Desktop.
Save brandonkelly/65adaaea41582463954997807a7e9665 to your computer and use it in GitHub Desktop.
Craft Benchmarks

Test Info

  • Hardware: 2016 MacBook Pro w/ 2.9 GHz Intel Core i7, 16 GB 2133 MHz LPDDR3
  • MAMP Pro 4.1
  • Nginx 1.11.4
  • MySQL 5.6.34
  • PHP 5.6.28 / 7.1.0 (CGI mode, OPcache enabled)
  • ApacheBench 2.3
  • Craft CMS 2.6.2958 / 3.0.0-beta.1

Each test ran 100 nonconcurrent requests to the Happy Lager homepage. For the Craft 3 test, the templates were updated to fix deprecation errors.

ApacheBench Commands

ab -n 100 -c 1 -l -T text/html http://127.0.0.1:6025/
ab -n 100 -c 1 -l -T text/html http://127.0.0.1:6027/
ab -n 100 -c 1 -l -T text/html http://127.0.0.1:6037/

Results

Server Requests/second Time/request (ms) Transfer rate (kb/s)
Craft 2 / PHP 5 2.98 335.073 23.28
Craft 2 / PHP 7 9.09 110.049 70.65
Craft 3 / PHP 7 12.95 77.237 98.27
Server Software: nginx/1.11.4
Server Hostname: 127.0.0.1
Server Port: 6025
Document Path: /
Document Length: Variable
Concurrency Level: 1
Time taken for tests: 33.507 seconds
Complete requests: 100
Failed requests: 0
Total transferred: 798800 bytes
HTML transferred: 759400 bytes
Requests per second: 2.98 [#/sec] (mean)
Time per request: 335.073 [ms] (mean)
Time per request: 335.073 [ms] (mean, across all concurrent requests)
Transfer rate: 23.28 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 319 335 8.7 334 364
Waiting: 319 335 8.7 334 364
Total: 319 335 8.7 334 364
Percentage of the requests served within a certain time (ms)
50% 334
66% 337
75% 339
80% 341
90% 346
95% 352
98% 364
99% 364
100% 364 (longest request)
Server Software: nginx/1.11.4
Server Hostname: 127.0.0.1
Server Port: 6027
Document Path: /
Document Length: Variable
Concurrency Level: 1
Time taken for tests: 11.005 seconds
Complete requests: 100
Failed requests: 0
Total transferred: 796100 bytes
HTML transferred: 759400 bytes
Requests per second: 9.09 [#/sec] (mean)
Time per request: 110.049 [ms] (mean)
Time per request: 110.049 [ms] (mean, across all concurrent requests)
Transfer rate: 70.65 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 103 110 4.5 109 128
Waiting: 103 110 4.5 109 128
Total: 103 110 4.5 109 128
Percentage of the requests served within a certain time (ms)
50% 109
66% 111
75% 113
80% 114
90% 116
95% 119
98% 123
99% 128
100% 128 (longest request)
Server Software: nginx/1.11.4
Server Hostname: 127.0.0.1
Server Port: 6037
Document Path: /
Document Length: Variable
Concurrency Level: 1
Time taken for tests: 7.724 seconds
Complete requests: 100
Failed requests: 0
Total transferred: 777200 bytes
HTML transferred: 759400 bytes
Requests per second: 12.95 [#/sec] (mean)
Time per request: 77.237 [ms] (mean)
Time per request: 77.237 [ms] (mean, across all concurrent requests)
Transfer rate: 98.27 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 66 77 5.7 77 100
Waiting: 66 77 5.7 77 100
Total: 66 77 5.7 77 100
Percentage of the requests served within a certain time (ms)
50% 77
66% 78
75% 78
80% 79
90% 81
95% 92
98% 98
99% 100
100% 100 (longest request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment