Php HHVM-FastCGI:性能差

Php HHVM-FastCGI:性能差,php,performance,hhvm,Php,Performance,Hhvm,我正在尝试从nginx上的php5.4(FPM作为FastCGI和apc)迁移到HHVM-FastCGI(nginx) 我的应用程序是一个以Slim为框架的广告服务器。ad服务器正在连接到redis、memcached(用于套接字和http)、MySQL、MongoDB(这些端点在HHVM版本中被禁用)、使用SOAP的Java后端和beanstalkd 应用程序有一个测试端点,它计算一个斐波那契数列,在请求11之后,速度非常快 但是。。。其他端点的基准在hhvm中更差(当然,在请求11之后) 我

我正在尝试从nginx上的php5.4(FPM作为FastCGI和apc)迁移到HHVM-FastCGI(nginx)

我的应用程序是一个以Slim为框架的广告服务器。ad服务器正在连接到redis、memcached(用于套接字和http)、MySQL、MongoDB(这些端点在HHVM版本中被禁用)、使用SOAP的Java后端和beanstalkd

应用程序有一个测试端点,它计算一个斐波那契数列,在请求11之后,速度非常快

但是。。。其他端点的基准在hhvm中更差(当然,在请求11之后)

我认为hhvm模式解释器总是打开的

一些想法

谢谢

环境:

8个处理器和8gb RAM

$ uname -a
Linux 3.13.0-30-generic #55-Ubuntu SMP Fri Jul 4 21:40:53 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:    14.04
Codename:   trusty
我编译hhvm是因为我修改了phpredis:

$ hhvm --version
HipHop VM 3.2.0-dev (rel)
Compiler: heads/master-0-gb7802e739a1f16808dd06c57754c1dc77ed80054
Repo schema: acdee0ea91d0b5967c60a0a42f5dbf81433a7821
测试:

斐波那契检验

PHP

1.1112360954285
Endpoint time
0.011466026306152
SOAP connection time
0.0031890869140625
HHVM

1.7104048728943
1.7193510532379
1.7104179859161
1.713366985321
1.7120008468628
1.7102618217468
1.7118058204651
1.7113170623779
1.7101211547852
1.7117080688477
1.7127840518951
0.10136723518372
1 Endpoint time
0.26668095588684
1 SOAP connection time
0.017861127853394

2 Endpoint time
0.059494972229004
2 SOAP connection time
0.0069239139556885

3 Endpoint time
0.058794975280762
3 SOAP connection time
0.007004976272583

4 Endpoint time
0.057528972625732
4 SOAP connection time
0.0068209171295166

5 Endpoint time
0.059458017349243
5 SOAP connection time
0.0067899227142334

6 Endpoint time
0.058032035827637
6 SOAP connection time
0.0068209171295166

7 Endpoint time
0.060270071029663
7 SOAP connection time
0.0065340995788574

8 Endpoint time
0.062243938446045
8 SOAP connection time
0.0065720081329346

9 Endpoint time
0.060788869857788
9 SOAP connection time
0.009145975112915

10 Endpoint time
0.065010070800781
10 SOAP connection time
0.007810115814209

11 Endpoint time
0.057285785675049
11 SOAP connection time
0.0065789222717285

12 Endpoint time
0.057971000671387
12 SOAP connection time
0.0066900253295898
地理定位测试(SOAP)

PHP

1.1112360954285
Endpoint time
0.011466026306152
SOAP connection time
0.0031890869140625
HHVM

1.7104048728943
1.7193510532379
1.7104179859161
1.713366985321
1.7120008468628
1.7102618217468
1.7118058204651
1.7113170623779
1.7101211547852
1.7117080688477
1.7127840518951
0.10136723518372
1 Endpoint time
0.26668095588684
1 SOAP connection time
0.017861127853394

2 Endpoint time
0.059494972229004
2 SOAP connection time
0.0069239139556885

3 Endpoint time
0.058794975280762
3 SOAP connection time
0.007004976272583

4 Endpoint time
0.057528972625732
4 SOAP connection time
0.0068209171295166

5 Endpoint time
0.059458017349243
5 SOAP connection time
0.0067899227142334

6 Endpoint time
0.058032035827637
6 SOAP connection time
0.0068209171295166

7 Endpoint time
0.060270071029663
7 SOAP connection time
0.0065340995788574

8 Endpoint time
0.062243938446045
8 SOAP connection time
0.0065720081329346

9 Endpoint time
0.060788869857788
9 SOAP connection time
0.009145975112915

10 Endpoint time
0.065010070800781
10 SOAP connection time
0.007810115814209

11 Endpoint time
0.057285785675049
11 SOAP connection time
0.0065789222717285

12 Endpoint time
0.057971000671387
12 SOAP connection time
0.0066900253295898

我不会采取行动。我有一个客户在运行wordpress() 这就是性能问题。它运行在lamp/ubuntu/ec2:lb上,每天的独特性超过50000个。在安装和配置FPM后,它一直稳定且持续运行

这取决于你得到了什么,以及你试图实现什么。虽然你的科学模式看起来很有趣,但基准似乎是个问题。无论我的个人经历是什么情况,我都尝试过很多,包括zend server optimizer,我对它不感兴趣,也对它嗤之以鼻


在Amazon上,我们能够向2台diff db/web服务器发送lb请求,这帮助我们扑灭了大火,尽管计划中没有这样做

2014年8月,我帮助Facebook HHVM团队解决了这个完全相同的问题

该问题于2015年1月在HHVM 3.5中得到解决

见我的问题:

你试过了吗?试过了!但是没有任何变化。正如我所看到的,性能方面存在一个问题。嘿,你能分享hhvm的phpredis代码库吗?关于github等