I must have missed something. But I'm getting the same performance with php and hhvm by runningab -n 100 -c 10 http://127.0.0.1:8080/
php -v returns:
HipHop VM 3.2.0 (rel)
Compiler: tags/HHVM-3.2.0-0-g01228273b8cf709aacbd3df1c51b1e690ecebac8
Repo schema: c52ba40f4a246d35a88f1dfc1daf959851ced8aa`
tail -3 /var/log/nginx/access.log
returns
127.0.0.1 - - [13/Sep/2014:02:46:33 +0300] "GET / HTTP/1.0" 200 116 "-" "ApacheBench/2.3"
127.0.0.1 - - [13/Sep/2014:02:46:33 +0300] "GET / HTTP/1.0" 200 116 "-" "ApacheBench/2.3"
127.0.0.1 - - [13/Sep/2014:02:46:33 +0300] "GET / HTTP/1.0" 200 116 "-" "ApacheBench/2.3"`
nginx conf:
location ~ \.(hh|php)$ {
fastcgi_keep_conn on;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
this is my /etc/hhvm/php.ini
file:
hhvm.log.level = Warning
hhvm.log.always_log_unhandled_exceptions = true
hhvm.log.runtime_error_reporting_level = 8191
hhvm.mysql.typed_results = false
hhvm.eval.jit_warmup_requests = 0
hhvm.eval.jit = true
and this is my /etc/hhvm/server.ini
file:
pid = /var/run/hhvm/pid
; hhvm specific
hhvm.server.port = 9000
hhvm.server.type = fastcgi
hhvm.server.default_document = index.php
hhvm.log.use_log_file = true
hhvm.log.file = /var/log/hhvm/error.log
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc
hhvm.eval.jit_warmup_requests = 0
hhvm.eval.jit = true
I made sure to restart hhvm
nginx
and also rebooted my server.
I work on the HHVM team, and recently I've been looking at benchmarking. A few problems stand out:
Benchmarking is very hard; I've been trying to automate a 'good' benchmark suite - you can find the work in progress here: https://github.com/facebook/hhvm/tree/master/hphp/test/frameworks/perf/
It currently only supports wordpress, but I'm hoping to change that soon.
The key things it does:
Also, what code are you trying to run? It's completely possible that we're actually slower at running your code; for example, we're fast at running mediawiki, but we're slow at running 'print' in a loop, fibonacci, or the other classical benchmarks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With