极慢的HHVM,Wordpress,Nginx [英] extremely slow HHVM, Wordpress, Nginx

查看:104
本文介绍了极慢的HHVM,Wordpress,Nginx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可能做错了,但是我在php-fpm wordpress设置和HHVM wordpress设置之间进行了一些测试.我听说过看到了许多HHVM令人震惊的结果,但是我对获得的结果感到震惊.

I might be doing something wrong but I am doing a bit of testing between a php-fpm wordpress setup and a HHVM wordpress setup. I've heard & seen many mind blowing results from HHVM, but I'm just shocked at the results I'm getting.

使用以下apache测试命令,我从php-fpm获得的性能要比HHVM高得多.

Using the following apache testing command I'm getting a much higher performance rate from php-fpm than HHVM.

ab -n1000 http://127.0.0.1:8080/

对于php-fpm,我每秒收到109.98个请求.

For php-fpm I am getting 109.98 requests/second.

不幸的是,对于我来说,HHVM每秒只能收到约12.33个请求.

Unfortunately for me I'm getting only ~12.33 requests/second with HHVM.

这些测试是在标准的全新Wordpress安装上完成的.我的配置一定做错了.我只需要新鲜的一双眼睛,看看我是否做错了什么.

These tests are done on a standard fresh Wordpress install. I must be doing something wrong in my configuration. I just need a fresh pair of eyes to see if I'm not doing something right.

本地Macbook上的无所事事实例. Ubuntu服务器14.04.1 LTS 1GB内存 1个CPU Nginx的 MySQL

Vagrant instance from my local Macbook. Ubuntu Server 14.04.1 LTS 1GB RAM 1 CPU Nginx MySQL

pid = /var/run/hhvm/pid
hhvm.server.file_socket=/var/run/hhvm/hhvm.sock
hhvm.server.type = fastcgi
hhvm.server.default_document = index.php
hhvm.log.level = Warning
hhvm.log.always_log_unhandled_exceptions = true
hhvm.log.runtime_error_reporting_level = 8191
hhvm.log.use_log_file = true
hhvm.log.file = /var/log/hhvm/error.log
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc
hhvm.mysql.typed_results = false
hhvm.eval.jit_warmup_requests = 0
hhvm.eval.jit = true

Nginx配置

location ~ \.(hh|php)$ {
    fastcgi_pass unix:/var/run/hhvm/hhvm.sock;
    fastcgi_index   index.php;
    fastcgi_param   SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include         fastcgi_params;
}

感谢您的帮助!谢谢.

推荐答案

好,所以我终于弄清楚了为什么会这样...

不是HHVM速度慢.我正在使用Vagrant,并在主机和来宾操作系统之间设置了共享目录. VirtualBox共享文件夹非常慢!!!当我将所有Wordpress文件放在不同的私有目录中并向Nginx指向它时,我的请求/秒急剧增加.

It is not HHVM that is slow. I am using Vagrant and setting up a shared directory between my host and guest OS. VirtualBox shared folders are extremely SLOW!!! When I placed all my Wordpress files in a different private directory and pointed Nginx to it my requests/second dramatically increased.

这篇关于极慢的HHVM,Wordpress,Nginx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆