奔歌之前先贬一贬
HHVM手动编译太不友好了,如果你本身的环境不是纯净的环境,用过yum安装过其中的一些必须要求的库的话,就不要手动编译了,各种报错让你感动。自行编译一些库的话,也有坑,一些库的版本不能低也不能高,要求实在太多了,排了两天错才搞定编译。所以强烈建议少折腾,直接用官方提供的预编译包!!!
不过还是挺令我欣喜的
简单benchmark一下,同样跑一个Typecho的话
[root@main hhvm]# ab -n 10000 test_site
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking test_site (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
^CServer Software: Tengine/2.0.2
Server Hostname: test_site
Server Port: 80
Document Path: /
Document Length: 24568 bytes
Concurrency Level: 1
Time taken for tests: 230.869 secondsComplete requests: 8646
Failed requests: 0
Write errors: 0
Total transferred: 214740702 bytes
HTML transferred: 212414928 bytes
Requests per second: 37.45 [#/sec] (mean)
Time per request: 26.702 [ms] (mean)
Time per request: 26.702 [ms] (mean, across all concurrent requests)
Transfer rate: 908.34 [Kbytes/sec] receivedConnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 26 27 0.8 27 81
Waiting: 26 26 0.8 26 81
Total: 26 27 0.8 27 81Percentage of the requests served within a certain time (ms)
50% 27
66% 27
75% 27
80% 27
90% 27
95% 27
98% 27
99% 28
100% 81 (longest request)
[root@main hhvm]# ab -n 10000 test_site
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking test_site (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
^CServer Software: Tengine/2.0.2
Server Hostname: test_site
Server Port: 80Document Path: /
Document Length: 24568 bytesConcurrency Level: 1
Time taken for tests: 475.457 seconds
Complete requests: 8475
Failed requests: 2
(Connect: 0, Receive: 0, Length: 2, Exceptions: 0)
Write errors: 0
Total transferred: 210713865 bytes
HTML transferred: 208213740 bytes
Requests per second: 17.82 [#/sec] (mean)
Time per request: 56.101 [ms] (mean)
Time per request: 56.101 [ms] (mean, across all concurrent requests)
Transfer rate: 432.79 [Kbytes/sec] receivedConnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 56 56 0.3 56 68
Waiting: 55 56 0.3 56 67
Total: 56 56 0.3 56 68Percentage of the requests served within a certain time (ms)
50% 56
66% 56
75% 56
80% 56
90% 56
95% 56
98% 57
99% 57
100% 68 (longest request)
测试期间,CPU占用大致相当,同样的时间HHVM几乎完成了两倍的请求
Nice!
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.