[英]hhvm performance similar to PHP 5.5 Ubuntu 14.04
I must have missed something. 我一定错过了什么。 But I'm getting the same performance with php and hhvm by running
但是我通过运行获得了与php和hhvm相同的性能
ab -n 100 -c 10 http://127.0.0.1:8080/
php -v returns: php -v返回:
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 tail -3 /var/log/nginx/access.log
返回
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: 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: 这是我的
/etc/hhvm/php.ini
文件:
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: 这是我的
/etc/hhvm/server.ini
文件:
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. 我确保重启
hhvm
nginx
并重启我的服务器。
I work on the HHVM team, and recently I've been looking at benchmarking. 我在HHVM团队工作,最近我一直在研究基准测试。 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/
我一直在尝试自动化一个“好”的基准测试套件 - 你可以在这里找到正在进行的工作: https : //github.com/facebook/hhvm/tree/master/hphp/test/frameworks/perf/
It currently only supports wordpress, but I'm hoping to change that soon. 它目前只支持wordpress,但我希望尽快改变它。
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.
例如,我们正在快速运行mediawiki,但我们在循环,斐波纳契或其他经典基准测试中运行'print'的速度很慢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.