HHVMの性能はやはり十分に強いです

2526 ワード

テストスクリプト:
<?php
$c = 0;
for($i=0;$i<1000;$i++){
    for($j=0;$j<10000;$j++)
    {
        $c += ($i*$j)*($i+$j);
    }
}
echo $c;

ab -t 60 http://127.0.0.1/index.php
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)