Last active
August 29, 2015 14:15
-
-
Save jdub/4a9dc6b1a82685328d98 to your computer and use it in GitHub Desktop.
hhvm vs. php5-fpm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(YES, THIS IS GOOFY AND NAIVE AND SO ON.) | |
Software: | |
- Ubuntu 14.04.2 LTS | |
- nginx 1.4.6 | |
- hhvm 2.5.1 | |
- php5-fpm 5.5.9 (pm.max_children = 30) | |
- WordPress 4.4.1 (fresh install, so very little data) | |
Hardware: | |
- Laughable HP ProLiant MicroServer (dual core 800MHz Athlon) | |
Methodology: | |
- siege was giving me grief, so I used ab. I know, I know. | |
- Tests were run from a VM running on a different physical machine. | |
- Both HHVM and php-fpm were set up in UNIX socket mode. | |
- Same WordPress install, with WP_HOME and WP_SITEURL munged. | |
- The only difference in the responses was the port in computed URLs. | |
jdub@ubuntu:~$ curl --silent http://10.11.0.2:81/ | wc | |
125 433 7071 | |
jdub@ubuntu:~$ curl --silent http://10.11.0.2:82/ | wc | |
125 433 7071 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Server Software: nginx/1.4.6 | |
Server Hostname: 10.11.0.2 | |
Server Port: 81 | |
Document Path: / | |
Document Length: 7071 bytes | |
Concurrency Level: 10 | |
Time taken for tests: 30.000 seconds | |
Complete requests: 2303 | |
Failed requests: 0 | |
Total transferred: 16779658 bytes | |
HTML transferred: 16284513 bytes | |
Requests per second: 76.77 [#/sec] (mean) | |
Time per request: 130.266 [ms] (mean) | |
Time per request: 13.027 [ms] (mean, across all concurrent requests) | |
Transfer rate: 546.21 [Kbytes/sec] received | |
Connection Times (ms) | |
min mean[+/-sd] median max | |
Connect: 0 0 0.1 0 3 | |
Processing: 48 129 18.8 131 177 | |
Waiting: 48 128 18.5 130 175 | |
Total: 49 130 18.8 132 177 | |
Percentage of the requests served within a certain time (ms) | |
50% 132 | |
66% 140 | |
75% 144 | |
80% 147 | |
90% 153 | |
95% 158 | |
98% 164 | |
99% 166 | |
100% 177 (longest request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Server Software: nginx/1.4.6 | |
Server Hostname: 10.11.0.2 | |
Server Port: 82 | |
Document Path: / | |
Document Length: 7071 bytes | |
Concurrency Level: 10 | |
Time taken for tests: 30.051 seconds | |
Complete requests: 801 | |
Failed requests: 0 | |
Total transferred: 5844096 bytes | |
HTML transferred: 5663871 bytes | |
Requests per second: 26.65 [#/sec] (mean) | |
Time per request: 375.170 [ms] (mean) | |
Time per request: 37.517 [ms] (mean, across all concurrent requests) | |
Transfer rate: 189.91 [Kbytes/sec] received | |
Connection Times (ms) | |
min mean[+/-sd] median max | |
Connect: 0 0 0.2 0 4 | |
Processing: 76 372 63.0 373 538 | |
Waiting: 75 366 60.9 366 535 | |
Total: 76 372 63.0 373 539 | |
Percentage of the requests served within a certain time (ms) | |
50% 373 | |
66% 390 | |
75% 420 | |
80% 436 | |
90% 457 | |
95% 470 | |
98% 482 | |
99% 486 | |
100% 539 (longest request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream hhvm { | |
server unix:/var/run/hhvm/sock; | |
} | |
server { | |
listen 81 default_server; | |
listen [::]:81 default_server ipv6only=on; | |
root /srv/wordpress/wordpress; | |
index index.php index.html; | |
location / { | |
try_files $uri $uri/ /index.php; | |
} | |
location ~ \.php$ { | |
include fastcgi_params; | |
fastcgi_pass hhvm; | |
fastcgi_max_temp_file_size 0; | |
} | |
} | |
upstream fpm { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
server { | |
listen 82 default_server; | |
listen [::]:82 default_server ipv6only=on; | |
root /srv/wordpress/wordpress; | |
index index.php index.html; | |
location / { | |
try_files $uri $uri/ /index.php; | |
} | |
location ~ \.php$ { | |
include fastcgi_params; | |
fastcgi_pass fpm; | |
fastcgi_max_temp_file_size 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment