hhvm mysql_HHVM性能果然够强劲

这篇博客对比了Apache和Nginx+HHVM在运行PHP测试脚本时的性能。Apache在26个请求中耗时62.117秒,而Nginx+HHVM在205个请求中耗时60.098秒,显示出更高的处理速度和更低的时间延迟。
摘要由CSDN通过智能技术生成

测试脚本:

$c = 0;

for($i=0;$i<1000;$i++){

for($j=0;$j<10000;$j++)

{

$c += ($i*$j)*($i+$j);

}

}

echo $c;

ab测试结果: Apache:

Benchmarking 127.0.0.1 (be patient)

Finished 26 requests

Server Software: Apache/2.2.15

Server Hostname: 127.0.0.1

Server Port: 80

Document Path: /index.php

Document Length: 18 bytes

Concurrency Level: 1

Time taken for tests: 62.117 seconds

Complete requests: 26

Failed requests: 0

Write errors: 0

Total transferred: 5486 bytes

HTML transferred: 468 bytes

Requests per second: 0.42 [#/sec] (mean)

Time per request: 2389.098 [ms] (mean)

Time per request: 2389.098 [ms] (mean, across all concurrent requests )

Transfer rate: 0.09 [Kbytes/sec] received

Connection Times (ms)

min mean[+/-sd] median max

Connect: 0 0 0.0 0 0

Processing: 2380 2389 8.0 2388 2411

Waiting: 2380 2389 7.4 2388 2405

Total: 2380 2389 8.0 2388 2411

Percentage of the requests served within a certain time (ms)

50% 2388

66% 2392

75% 2394

80% 2396

90% 2402

95% 2402

98% 2411

99% 2411

100% 2411 (longest request)

下面是nginx + hhvm

Benchmarking 127.0.0.1 (be patient)

Finished 205 requests

Server Software: nginx/1.6.0

Server Hostname: 127.0.0.1

Server Port: 80

Document Path: /index.php

Document Length: 18 bytes

Concurrency Level: 1

Time taken for tests: 60.098 seconds

Complete requests: 205

Failed requests: 0

Write errors: 0

Total transferred: 41000 bytes

HTML transferred: 3690 bytes

Requests per second: 3.41 [#/sec] (mean)

Time per request: 293.159 [ms] (mean)

Time per request: 293.159 [ms] (mean, across all concurrent requests)

Transfer rate: 0.67 [Kbytes/sec] received

Connection Times (ms)

min mean[+/-sd] median max

Connect: 0 0 0.0 0 0

Processing: 289 293 2.8 293 316

Waiting: 289 293 2.7 293 312

Total: 289 293 2.8 293 316

Percentage of the requests served within a certain time (ms)

50% 293

66% 294

75% 295

80% 295

90% 296

95% 296

98% 298

99% 298

100% 316 (longest request)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值