mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge pull request #2601 from GOLinux/master
[Translated]20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md
This commit is contained in:
commit
2656555a7a
119
Dict.md
Normal file
119
Dict.md
Normal file
@ -0,0 +1,119 @@
|
||||
|
||||
<img src="https://avatars3.githubusercontent.com/u/5432002?v=3&s=200" align="right" width="100" height="100"></img>
|
||||
<font face='黑体' size=6><b><center>Linux中国术语词典</center></b></font>
|
||||
<br />
|
||||
<font face='微软雅黑' size=3><b><center>[Linux中国](http://www.linux.cn)出品</center></b></font>
|
||||
****************************************************
|
||||
****************************************************
|
||||
<font face='微软雅黑'><b>本词典为规范Linux中国翻译组(LCTT)技术术语翻译而编写,同时也方便广大翻译志愿者查阅。限于编写者的水平,其中可能有不完善或疏漏的地方,希望广大翻译志愿者不吝指正。同时,希望广大翻译志愿者能提供相关术语的翻译供大家参考。另外,若在翻译过程中对某些术语有疑虑,可在我们的QQ专门群中进行讨论。在此,谨代表LCTT感谢各位志愿者的辛勤劳动和无私奉献。</b></font>
|
||||
<font face='微软雅黑' size=3><b><p align='right'>LCTT翻译组</p></b></font>
|
||||
****************************************************
|
||||
|
||||
#### A ####
|
||||
### 1. APM:高级电源管理
|
||||
### 2.
|
||||
#### B ####
|
||||
### 1. Backbone:骨干
|
||||
>是一个网络的一部分,其作为所有网络运输的一个基本通道,其需要非常高的带宽。一个骨干网络的服务提供者连接许多企业子网和较小服务提供者的网络。一个企业骨干网络连接许多局域网和数据中心。
|
||||
### 2. B channel(Bearer channel):承载信道
|
||||
>承载信道(Bearer Channel),也叫做B channel,是一个全双工DS0时间槽(64-kbps),其携带模拟语音或数字资料通过综合服务数字网(ISDN)。
|
||||
### 3. Backchannel:反向通道
|
||||
>是指当其他实时在线会话在进行中时,习惯使用网络化的计算机来维持一个实时的在线会话。
|
||||
### 4. Back End:后台
|
||||
>在一个计算机系统中,是指为一个前台作业提供服务的一个节点或软件程序。前台直接影响用户,后台可能与其他系统相连接,如数据库和其它系统。
|
||||
### 5. Back-haul:回程线路
|
||||
>是一个通信信道,它使携带信息流到远于最终目的地的地方,然后将它送回。这样做是因为传输到更远的远程区域的代价要远比直接发送的代价低地多。
|
||||
### 6. Backoff:退避
|
||||
>是指当一个主机已经在有MAC 协议的网络中经历了一个冲突之后试图去重发之前的等待时期。这个退避时间通常是任意的来最小化相同节点再次冲突的可能性。在每次冲突后增加退避时期也能帮助预防重复碰撞,特别当这个网络负担很重时。
|
||||
### 7. Backplane:附加卡
|
||||
>在许多网络中是一个物理接口模块,例如,连接在一个界面处理器或卡和在一个总线机箱内数据总线和功率分配总线之间的一个路由器或转换器。
|
||||
### 8. Back Pressure:背压
|
||||
>在计算机系统中,是指网络拥塞信息逆流通过一个Internet网络。
|
||||
### 9. Balun(balanced-unbalanced):不平衡变压器
|
||||
>意味着平衡-非平衡。不平衡变压器是一个设计用来转换平衡和不平衡之间的电信号的设备。
|
||||
### 10. Baseband:基带
|
||||
>是一种类型的网络技术,在那里仅仅一种载波频率被使用。在一个基带网中,信息在传送介质中以数字的形式被携带在一个单一的多元信号通道中。
|
||||
### 11. Bastion Host:防御主机
|
||||
>是在内部网络和外部网络之间的一个网关,它被设计来防御针对内部网络的攻击。这个系统在非武装区(DMZ)的公共一边,不被防火墙或过滤路由器保护,它对攻击是完全暴露的。
|
||||
### 12: Bc(Committed Burst):约定资讯讯务
|
||||
>是一个用在帧中继系统的术语,是一个帧中继交互网约定接受和传输和通过一个帧中继网络数据链路控制(DLC)和一个特殊的时帧的最大数据量(用比特表示)。
|
||||
### 13. BCP(Best Current Practices):最优现行方法
|
||||
>是副系列的IETF RFCs,其被用于描述在Internet上的最优配置技术。
|
||||
### 14. BCU(Balanced Configuration Unit):平衡配置单元
|
||||
>是一个综合的IBM解决方法,它由软件和硬件组成。BCUs是综合的和测试作为数据仓库系统的预配置功能块。
|
||||
### 15. BECN(Backward Explicit Congestion Notification):显式拥塞通知
|
||||
>是在帧中继报头的一个1比特域,其发信号到任何接收帧的事物(转换器和数据终端设备),拥塞就发生在帧的反面(后面)。帧中继转换器和数据终端设备可能遵照显式拥塞通知位来减慢那个方向的数据传输率。
|
||||
### 16. BER(Bit Error Rate):误码率
|
||||
>是接收到的位包含错误的比率。BER通常被表示成十足的负面力量。
|
||||
### 17. BIP(Bit Interleaved Parity):位交叉奇偶校验
|
||||
>一个用在ATM中的术语,是一个通常用来检测链接错误的一种方法。一个检测位或字被嵌入到以前发生阻塞或帧的链接中。位错误在有效载荷中能够作为维护信息被删除和报告。
|
||||
|
||||
#### C ####
|
||||
|
||||
#### D ####
|
||||
### 1. daemon:守护进程
|
||||
### 2.
|
||||
#### F ####
|
||||
|
||||
#### G ####
|
||||
|
||||
#### H ####
|
||||
### 1. Home Directory:家目录
|
||||
#### I ####
|
||||
|
||||
#### J ####
|
||||
|
||||
#### K ####
|
||||
|
||||
#### L ####
|
||||
|
||||
#### M ####
|
||||
|
||||
#### N ####
|
||||
|
||||
#### O ####
|
||||
|
||||
#### P ####
|
||||
### 1.P-code(Pseudo-code):伪代码语言
|
||||
>一种解释型语言,执行方式介于编译型语言和解释型语言之间。和解释型语言一样,伪代码编程语言无需编译,在执行时自动转换成二进制形式。然而,和编译型语言不同的是,这种可执行的二进制文件是以伪代码的形式而不是机器语言的形式存储的。伪代码语言的例子有 Java、Python 和 REXX/Object REXX。
|
||||
### 2. PAM(Pluggable Authentication Modules):可插拔认证模块
|
||||
>用于系统安全性的可替换的用户认证模块,它允许在不知道将使用何种认证方案的情况下进行编程。这允许将来用其它模块来替换某个模块,却无需重写软件。
|
||||
### 3. Port/Ported/Porting:移植
|
||||
>一个过程,即获取为某个操作系统平台编写的程序,并对其进行修改使之能在另一 OS 上运行,并且具有类似的功能。
|
||||
### 4. POSIX(Portable Operating System Interface for uniX):UNIX 可移植操作系统接口
|
||||
>一组编程接口标准,它们规定如何编写应用程序源代码以便应用程序可在操作系统之间移植。POSIX 基于 UNIX,它是 The Open Group 的 X/Open 规范的基础。
|
||||
#### Q ####
|
||||
|
||||
#### R ####
|
||||
### 1. RCS(Revision Control System):修订控制系统
|
||||
>一组程序,它们控制组环境下文件的共享访问并跟踪文本文件的变化。常用于维护源代码模块的编码工作。
|
||||
### 2. RFS(Remote File Sharing):远程文件共享
|
||||
>一个程序,它让用户访问其它计算机上的文件,就好象文件在用户的系统上一样。
|
||||
#### S ####
|
||||
### 1. shebang [ʃɪ'bæŋ]:释伴
|
||||
>Shebang(也称为Hashbang)是一个由井号和叹号构成的字符序列(#!),出现在文本文件的第一行的前两个字符,后跟解释器路径,如:#!/bin/sh,这通常是Linux中shell脚本的标准起始行。
|
||||
>长期以来,shebang都没有正式的中文名称。Linux中国翻译组将其翻译为:释伴,即解释伴随行的简称,同时又是shebang的音译。
|
||||
### 2. Spool(Simultaneous Peripheral Operation On-Line):假脱机
|
||||
>将数据发送给一个程序,该程序将该数据信息放入队列以备将来使用(例如,打印假脱机程序)
|
||||
### 2. Steganography:隐写术
|
||||
>将一段信息隐藏在另一段信息中的做法。一个示例是在数字化照片中放置不可见的数字水印。
|
||||
### 3. Swap:交换
|
||||
>暂时将数据(程序和/或数据文件)从随机存取存储器移到磁盘存储器(换出),或反方向移动(换入),以允许处理比物理内存所能容纳的更多的程序和数据。
|
||||
#### T ####
|
||||
### 1. Time-sharing:分时
|
||||
>一种允许多个用户分享处理器的方法,它以时间为基础给每个用户分配一部分处理器资源,按照这些时间段轮流运行每个用户的进程。
|
||||
### 2. TL;DR:长篇摘要
|
||||
>Too Long;Didn't Read的缩写词,即太长,未阅的意思。该词多见于互联网社区论坛中,用于指出该文太长,没有阅读,或者标示出一篇长文章的摘要。因此,Linux中国翻译组将其翻译为:长篇摘要。
|
||||
#### U ####
|
||||
|
||||
#### V ####
|
||||
### 1. VRML(Virtual Reality Modeling Language):虚拟现实建模语言
|
||||
>一种主要基于 Web 的语言,用于 3D 效果(如构建遍历)。
|
||||
#### W ####
|
||||
### 1. Wrapper:封装器
|
||||
>用于启动另一个程序的程序。
|
||||
#### X ####
|
||||
|
||||
#### Y ####
|
||||
|
||||
#### Z ####
|
@ -1,266 +0,0 @@
|
||||
Translating by GOLinux ...
|
||||
Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM
|
||||
================================================================================
|
||||
**TL;DR In a local, Vagrant-based environment HHVM lost, probably due to a bug; it’s still investigated with the help of the HHVM guys! However on a DigitalOcean 4GB box it beat even the latest build of PHP-NG!**
|
||||
|
||||
![](https://kinsta.com/wp-content/uploads/2014/07/phphhvm.jpg)
|
||||
|
||||
**Update: Please take a look at the results at the end of the article! They reflect the power of HHVM better (after the JIT warmup), for some reason we cannot get these results with all setups though.
|
||||
|
||||
The tests below were done in a Vagrant/VVV environment, the results are still interesting, it might be a bug in HHVM or the Vagrant setup that’s preventing it from kicking into high speed, we’re investigating the issue with the HHVM guys.**
|
||||
|
||||
If you remember we [wrote an article a good couple of months ago][1] when WordPress 3.9 came out that HHVM was fully supported beginning with that release, and we were all happy about it. The initial benchmark results showed HHVM to be far more superior than the Zend engine that’s currently powering all PHP builds. Then the problems came:
|
||||
|
||||
- HHVM can only be run as one user, which means less security (in shared environments)
|
||||
- HHVM does not restart itself after it crashes, and unfortunately it still does that quite often
|
||||
- HHVM uses a lot of memory right from the start, and yes, it per-request memory usage will be lower once you scale compared to PHP-FPM
|
||||
|
||||
Obviously you have to compromise based on your (or rather your sites’) needs but is it worth it? How much of a performance gain can you expect by switching to HHVM?
|
||||
|
||||
At Kinsta we really like to test everything new and generally optimize everything to provide the best environment to our clients. Today I finally took the time to set up a test environment and do some tests to compare a couple of different builds with a fresh out of the box WordPress install and one that has a bunch of content added plus runs WooCommerce! To measure the script running time I simply added the
|
||||
|
||||
<?php timer_stop(1); ?>
|
||||
|
||||
line before the /body tag of the footer.php’s.
|
||||
|
||||
**Note:
|
||||
Previously this section contained benchmarks made with Vagrant/Virtualbox/Ubuntu14.04 however for some reason HHVM was really underperforming, probably due to a bug or a limitation of the virtualized environment. We feel that these test results do not reflect the reality so we re-run the tests on a cloud server and consider these valid.**
|
||||
|
||||
Here are the exact setup details of the environment:
|
||||
|
||||
- DigitalOcean 4GB droplet (2 CPU cores, 4GB RAM)
|
||||
- Ubuntu 14.04, MariaDB10
|
||||
- Test site: Munditia Theme with Demo Content Imported, WooCommerce 2.1.12 & WordPress 3.9.1
|
||||
- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d) and HHVM 3.2.0 (version says PHP 5.6.99-hhvm)
|
||||
|
||||
**Without further ado, these were my test results, the lower the better, values in seconds:**
|
||||
|
||||
### DigitalOcean 4GB droplet ###
|
||||
|
||||
Seconds, 10 runs, lower the better.
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
It looks like that PHP-NG achieves its peak performance after the first run! HHVM needs a couple more reloads, but their performance seems to be almost equal! I can’t wait until PHP-NG is merged into the master! :)
|
||||
|
||||
Hits in a minute, higher the better.
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
**PHP 5.5.15 OpCache Disabled**
|
||||
|
||||
- Transactions: **236 hits**
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.03 secs
|
||||
- Data transferred: 2.40 MB
|
||||
- Response time: 2.47 secs
|
||||
- Transaction rate: 4.00 trans/sec
|
||||
- Throughput: 0.04 MB/sec
|
||||
- Concurrency: 9.87
|
||||
- Successful transactions: 236
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 4.44
|
||||
- Shortest transaction: 0.48
|
||||
|
||||
**PHP 5.5.15 OpCache Enabled**
|
||||
|
||||
- Transactions: **441 hits**
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.55 secs
|
||||
- Data transferred: 4.48 MB
|
||||
- Response time: 1.34 secs
|
||||
- Transaction rate: 7.41 trans/sec
|
||||
- Throughput: 0.08 MB/sec
|
||||
- Concurrency: 9.91
|
||||
- Successful transactions: 441
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 2.19
|
||||
- Shortest transaction: 0.64
|
||||
|
||||
**PHP 5.6 RC2 OpCache Disabled**
|
||||
|
||||
- Transactions: **207 hits**
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.87 secs
|
||||
- Data transferred: 2.10 MB
|
||||
- Response time: 2.80 secs
|
||||
- Transaction rate: 3.46 trans/sec
|
||||
- Throughput: 0.04 MB/sec
|
||||
- Concurrency: 9.68
|
||||
- Successful transactions: 207
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 3.65
|
||||
- Shortest transaction: 0.54
|
||||
|
||||
**PHP 5.6 RC2 OpCache Enabled**
|
||||
|
||||
- Transactions: **412 hits**
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.03 secs
|
||||
- Data transferred: 4.18 MB
|
||||
- Response time: 1.42 secs
|
||||
- Transaction rate: 6.98 trans/sec
|
||||
- Throughput: 0.07 MB/sec
|
||||
- Concurrency: 9.88
|
||||
- Successful transactions: 412
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 1.93
|
||||
- Shortest transaction: 0.34
|
||||
|
||||
**HHVM 3.2.0 (version says PHP 5.6.99-hhvm)**
|
||||
|
||||
- Transactions: **955 hits**
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.69 secs
|
||||
- Data transferred: 9.18 MB
|
||||
- Response time: 0.62 secs
|
||||
- Transaction rate: 16.00 trans/sec
|
||||
- Throughput: 0.15 MB/sec
|
||||
- Concurrency: 9.94
|
||||
- Successful transactions: 955
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 0.85
|
||||
- Shortest transaction: 0.23
|
||||
|
||||
**PHP-NG OpCache Enabled (built: Jul 29 2014 )**
|
||||
|
||||
- Transactions: **849 hits**
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.88 secs
|
||||
- Data transferred: 8.63 MB
|
||||
- Response time: 0.70 secs
|
||||
- Transaction rate: 14.18 trans/sec
|
||||
- Throughput: 0.14 MB/sec
|
||||
- Concurrency: 9.94
|
||||
- Successful transactions: 849
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 1.06
|
||||
- Shortest transaction: 0.13
|
||||
|
||||
----------
|
||||
|
||||
**Note:
|
||||
These are the previous test results, they’re faulty. I left them here for future reference but please do NOT consider these values a truthful representation!**
|
||||
|
||||
Here are the exact setup details of the environment:
|
||||
|
||||
- Apple MacBook Pro mid-2011 (Intel Core i7 2 GHz 4 cores, 4GB RAM, 256GB Ocz Vertex 3 MI)
|
||||
- Current Varying Vagrant Vagrants build with Ubuntu 14.04, nginx 1.6.x, mysql 5.5.x, etc.
|
||||
- Test site 1: WordPress 3.9.1 bare minimum
|
||||
- Test site 2: Munditia Theme with Demo Content Imported, WooCommerce 2.1.12 & WordPress 3.9.1
|
||||
- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d) and HHVM 3.2.0 (version says PHP 5.6.99-hhvm)
|
||||
|
||||
**Default Theme, Default WordPress 3.9.1, PHP 5.5.9-1ubuntu4.3 (with OpCache 7.0.3)**
|
||||
|
||||
**Faulty results. Please read the note above!** Seconds, 10 runs, lower the better.
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
### Munditia Theme with Demo Content Imported, WooCommerce 2.1.12 & WordPress 3.9.1 (OpCache Disabled) ###
|
||||
|
||||
**Faulty results. Please read the note above**! Seconds, 10 runs, lower the better.
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
### Munditia Theme with Demo Content Imported, WooCommerce 2.1.12 & WordPress 3.9.1 (OpCache Enabled) ###
|
||||
|
||||
**Faulty results. Please read the note above!** Seconds, 10 runs, lower the better.
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
**Siege
|
||||
parameters: 10 concurrent users for 1 minute: siege -c 10 -b -t 1M**
|
||||
|
||||
**Faulty results. Please read the note above!** Hits in a minute, higher the better.
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
**PHP5.5 OpCache Disabled (PHP 5.5.15-1+deb.sury.org~trusty+1)Faulty results. Please read the note above!**
|
||||
|
||||
- Transactions: 35 hits
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.04 secs
|
||||
- Data transferred: 2.03 MB
|
||||
- Response time: 14.56 secs
|
||||
- Transaction rate: 0.59 trans/sec
|
||||
- Throughput: 0.03 MB/sec
|
||||
- Concurrency: 8.63
|
||||
- Successful transactions: 35
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 18.73
|
||||
- Shortest transaction: 5.80
|
||||
|
||||
**HHVM 3.2.0 (version says PHP 5.6.99-hhvm)Faulty results. Please read the note above!**
|
||||
|
||||
- Transactions: 44 hits
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.53 secs
|
||||
- Data transferred: 0.42 MB
|
||||
- Response time: 12.00 secs
|
||||
- Transaction rate: 0.74 trans/sec
|
||||
- Throughput: 0.01 MB/sec
|
||||
- Concurrency: 8.87
|
||||
- Successful transactions: 44
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 13.40
|
||||
- Shortest transaction: 2.65
|
||||
|
||||
**PHP5.5 OpCache Enabled (PHP 5.5.15-1+deb.sury.org~trusty+1 with OpCache 7.0.4-dev)Faulty results. Please read the note above!**
|
||||
|
||||
- Transactions: 100 hits
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.30 secs
|
||||
- Data transferred: 5.81 MB
|
||||
- Response time: 5.69 secs
|
||||
- Transaction rate: 1.69 trans/sec
|
||||
- Throughput: 0.10 MB/sec
|
||||
- Concurrency: 9.60
|
||||
- Successful transactions: 100
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 7.25
|
||||
- Shortest transaction: 2.82
|
||||
|
||||
**PHP5.6 OpCache Enabled (PHP 5.6.0RC2 with OpCache 7.0.4-dev)Faulty results. Please read the note above!**
|
||||
|
||||
- Transactions: 103 hits
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.99 secs
|
||||
- Data transferred: 5.98 MB
|
||||
- Response time: 5.51 secs
|
||||
- Transaction rate: 1.72 trans/sec
|
||||
- Throughput: 0.10 MB/sec
|
||||
- Concurrency: 9.45
|
||||
- Successful transactions: 103
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 6.87
|
||||
- Shortest transaction: 2.52
|
||||
|
||||
**PHP-NG OpCache Enabled (20140718-git-6cc487d)Faulty results. Please read the note above!**
|
||||
|
||||
- Transactions: 124 hits
|
||||
- Availability: 100.00 %
|
||||
- Elapsed time: 59.32 secs
|
||||
- Data transferred: 7.19 MB
|
||||
- Response time: 4.58 secs
|
||||
- Transaction rate: 2.09 trans/sec
|
||||
- Throughput: 0.12 MB/sec
|
||||
- Concurrency: 9.57
|
||||
- Successful transactions: 124
|
||||
- Failed transactions: 0
|
||||
- Longest transaction: 6.86
|
||||
- Shortest transaction: 2.24
|
||||
|
||||
**What do you think about this test? Did I miss something? What would you like to see in the next benchmarking article? Please leave your comment below!**
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://kinsta.com/blog/real-world-wordpress-benchmarks-with-php5-5-php5-6-php-ng-and-hhvm/
|
||||
|
||||
作者:[Mark Gavalda][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://kinsta.com/blog/author/kinstadmin/
|
||||
[1]:https://kinsta.com/blog/hhvm-and-wordpress/
|
@ -0,0 +1,270 @@
|
||||
真实世界WordPress PHP 5.5 PHP5.6 PHP-NG和HHVM基准测试
|
||||
================================================================================
|
||||
**长篇摘要:在一个基于Vagrant的本地环境中,可能是某个错误的原因,导致HHVM测试结果丢失了;在HHVM伙伴们协助下,该原因仍在研究中!然而,在数字海洋的一个4GB容器中,它甚至盖过了最新版的PHP-NG的风头!**
|
||||
![](https://kinsta.com/wp-content/uploads/2014/07/phphhvm.jpg)
|
||||
|
||||
**更新:请查看文章结尾的结果!它们反映出HHVM的功效更佳(在JIT热机后),虽然处于某些原因,我们不能在所有装备中获取这些结果。
|
||||
|
||||
下面的测试是在Vagrant/VVV环境中进行的,结果仍然令人关注。也许是HHVM或Vagrant配置中的某个错误,导致它不能以高速运行,我们正和HHVM的伙计们一起研究该问题。**
|
||||
|
||||
如果你记得我们[在几个月前写过一篇文章][1],那时WordPress 3.9表明是完全支持HHVM的,当时是那么令我们欢欣鼓舞。最初的基准测试结果显示,HHVM要比驱动着当前所有PHP构建的Zend引擎高级得多。后来,问题就出来了:
|
||||
|
||||
- HHVM只能以单个用户运行,这意味着(在共享环境中)安全性差了
|
||||
- HHVM在崩溃后不会自动重启,而不幸的是,它至今仍然经常发生
|
||||
- HHVM在启动时使用大量内存,而当你把它和PHP-FPM规模比较后会发现,它单个请求的内存使用量却更低。
|
||||
|
||||
很显然,你不得不根据你的(或者更确切地说是你的站点)的需求采取折中方案,然而这值得吗?切换到HHVM后,你期望获得多少性能改善呢?
|
||||
|
||||
在Kinsta,我们真的想要测试所有新技术,并通常会优化这一切来为我们的客户提供最佳的环境。今天,我最终花了点时间来配置测试环境并进行了一些测试来对比两个不同的构建,一个是全新出炉的WordPress安装,另外一个则添加了大量内容的WooCommerce!为了计量脚本的运行时间,我只是简单地添加了
|
||||
|
||||
<?php timer_stop(1); ?>
|
||||
|
||||
这一行到footer.php的/body标记前。
|
||||
|
||||
**注意:
|
||||
前面这一章节包含了Vagrant/Virtualbox/Ubuntu14.04的基准测试,然而出于某些原因,HHVM真的表现得很差,也许是某个错误所导致,又或许是虚拟化环境的限制。我们感到,这些测试结果并不反映真实情况,因此我们在云服务器上再次进行了测试,并考虑了这些情况的合理性。**
|
||||
|
||||
这里是配置环境的详情:
|
||||
|
||||
- 数字海洋4GB雨滴容器 (2 CPU核心, 4GB RAM)
|
||||
- Ubuntu 14.04, MariaDB10
|
||||
- 测试站点: 已导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1
|
||||
- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d)和HHVM 3.2.0 (版本中说是PHP 5.6.99-hhvm)
|
||||
|
||||
**没有进一步大费周章,这些就是我的测试结果,数值越低越好,以秒为单位:**
|
||||
### 数字海洋4GB雨滴容器 ###
|
||||
|
||||
秒,运行10次,越低越好
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
看起来似乎PHP-NG在它首次运行后就获得了峰值性能!HHVM需要更多几次重载,但是它们的性能貌似差不多!我等不到PHP-NG合并到主进程了!:)
|
||||
|
||||
一分钟命中,越高越好。
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
**PHP 5.5.15禁用OpCache**
|
||||
|
||||
- 执行: **236 hits**
|
||||
- 可用性: 100.00 %
|
||||
- 消耗时间: 59.03 secs
|
||||
- 传输的数据: 2.40 MB
|
||||
- 回应时间: 2.47 secs
|
||||
- 执行率: 4.00 trans/sec
|
||||
- 吞吐量: 0.04 MB/sec
|
||||
- 并发数: 9.87
|
||||
- 成功的执行: 236
|
||||
- 失败的执行: 0
|
||||
- 最长执行: 4.44
|
||||
- 最短执行: 0.48
|
||||
|
||||
**PHP 5.5.15启用OpCache**
|
||||
|
||||
- 执行: **441 hits**
|
||||
- 可用性: 100.00 %
|
||||
- 消耗时间: 59.55 secs
|
||||
- 传输的数据: 4.48 MB
|
||||
- 回应时间: 1.34 secs
|
||||
- 执行率: 7.41 trans/sec
|
||||
- 吞吐量: 0.08 MB/sec
|
||||
- 并发数: 9.91
|
||||
- 成功的执行: 441
|
||||
- 失败的执行: 0
|
||||
- 最长执行: 2.19
|
||||
- 最短执行: 0.64
|
||||
|
||||
**PHP 5.6 RC2禁用OpCache**
|
||||
|
||||
- 执行: **207 hits**
|
||||
- 可用性: 100.00 %
|
||||
- 消耗时间: 59.87 secs
|
||||
- 传输的数据: 2.10 MB
|
||||
- 回应时间: 2.80 secs
|
||||
- 执行率: 3.46 trans/sec
|
||||
- 吞吐量: 0.04 MB/sec
|
||||
- 并发数: 9.68
|
||||
- 成功的执行: 207
|
||||
- 失败的执行: 0
|
||||
- 最长执行: 3.65
|
||||
- 最短执行: 0.54
|
||||
-
|
||||
**PHP 5.6 RC2启用OpCache**
|
||||
|
||||
- 执行: **412 hits**
|
||||
- 可用性: 100.00 %
|
||||
- 消耗时间: 59.03 secs
|
||||
- 传输的数据: 4.18 MB
|
||||
- 回应时间: 1.42 secs
|
||||
- 执行率: 6.98 trans/sec
|
||||
- 吞吐量: 0.07 MB/sec
|
||||
- 并发数: 9.88
|
||||
- 成功的执行: 412
|
||||
- 失败的执行: 0
|
||||
- 最长执行: 1.93
|
||||
- 最短执行: 0.34
|
||||
|
||||
**HHVM 3.2.0(版本说是PHP 5.6.99-hhvm)**
|
||||
|
||||
- 执行: **955 hits**
|
||||
- 可用性: 100.00 %
|
||||
- 消耗时间: 59.69 secs
|
||||
- 传输的数据: 9.18 MB
|
||||
- 回应时间: 0.62 secs
|
||||
- 执行率: 16.00 trans/sec
|
||||
- 吞吐量: 0.15 MB/sec
|
||||
- 并发数: 9.94
|
||||
- 成功的执行: 955
|
||||
- 失败的执行: 0
|
||||
- 最长执行: 0.85
|
||||
- 最短执行: 0.23
|
||||
|
||||
**PHP-NG启用OpCache(构建: Jul 29 2014)**
|
||||
|
||||
- 执行: **849 hits**
|
||||
- 可用性: 100.00 %
|
||||
- 消耗时间: 59.88 secs
|
||||
- 传输的数据: 8.63 MB
|
||||
- 回应时间: 0.70 secs
|
||||
- 执行率: 14.18 trans/sec
|
||||
- 吞吐量: 0.14 MB/sec
|
||||
- 并发数: 9.94
|
||||
- 成功的执行: 849
|
||||
- 失败的执行: 0
|
||||
- 最长执行: 1.06
|
||||
- 最短执行: 0.13
|
||||
|
||||
----------
|
||||
|
||||
**注意:
|
||||
这些是先前的测试结果,它们不真实。我放在这里用于将来的参考,但是请不要将这些值当作真实的表现!**
|
||||
|
||||
这里是配置环境的详情:
|
||||
|
||||
- 苹果MacBook Pro mid-2011 (Intel Core i7 2 GHz 4 cores, 4GB RAM, 256GB Ocz Vertex 3 MI)
|
||||
- 当前修改中的Vagrant,带有Ubuntu 14.04, nginx 1.6.x, mysql 5.5.x等的Vagrants构建
|
||||
- 测试站点 1: WordPress 3.9.1最小化裸版
|
||||
- 测试站点 2: 导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1
|
||||
- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d)和HHVM 3.2.0 (版本中说是PHP 5.6.99-hhvm)
|
||||
|
||||
**默认主题,默认的WordPress 3.9.1, PHP 5.5.9-1ubuntu4.3 (带有OpCache 7.0.3)**
|
||||
|
||||
**错误结果,请阅读上面的说明!**
|
||||
|
||||
秒,10次运行,越低越好。
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
### 导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1(禁用OpCache) ###
|
||||
|
||||
**错误结果,请阅读上面的说明!**
|
||||
|
||||
秒,10次运行,越低越好。
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
### 导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1(启用OpCache)###
|
||||
|
||||
**错误结果,请阅读上面的说明!**
|
||||
|
||||
秒,10次运行,越低越好。
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
**Siege参数:1分钟10个并发用户:siege -c 10 -b -t 1M**
|
||||
|
||||
**错误结果,请阅读上面的说明!**
|
||||
|
||||
一分钟命中,越高越好。
|
||||
|
||||
这里有一个canvas的数据,发布的时候需要截一个图
|
||||
|
||||
**PHP5.5禁用OpCache(PHP 5.5.15-1+deb.sury.org~trusty+1)错误结果,请阅读上面的说明!**
|
||||
|
||||
- 执行: 35 hits
|
||||
- 可用性: 100.00 %
|
||||
- 消耗时间: 59.04 secs
|
||||
- 传输的数据: 2.03 MB
|
||||
- 回应时间: 14.56 secs
|
||||
- 执行率: 0.59 trans/sec
|
||||
- 吞吐量: 0.03 MB/sec
|
||||
- 并发数: 8.63
|
||||
- 成功的执行: 35
|
||||
- 失败的执行: 0
|
||||
- 最长执行: 18.73
|
||||
- 最短执行: 5.80
|
||||
|
||||
**HHVM 3.2.0 (version says PHP 5.6.99-hhvm)错误结果,请阅读上面的说明!**
|
||||
|
||||
- 执行: 44 hits
|
||||
- 可用性: 100.00 %
|
||||
- 消耗时间: 59.53 secs
|
||||
- 传输的数据: 0.42 MB
|
||||
- 回应时间: 12.00 secs
|
||||
- 执行率: 0.74 trans/sec
|
||||
- 吞吐量: 0.01 MB/sec
|
||||
- 并发数: 8.87
|
||||
- 成功的执行: 44
|
||||
- 失败的执行: 0
|
||||
- 最长执行: 13.40
|
||||
- 最短执行: 2.65
|
||||
|
||||
**PHP5.5启用OpCache(PHP 5.5.15-1+deb.sury.org~trusty+1 with OpCache 7.0.4-dev)错误结果,请阅读上面的说明!**
|
||||
|
||||
- 执行: 100 hits
|
||||
- 可用性: 100.00 %
|
||||
- 消耗时间: 59.30 secs
|
||||
- 传输的数据: 5.81 MB
|
||||
- 回应时间: 5.69 secs
|
||||
- 执行率: 1.69 trans/sec
|
||||
- 吞吐量: 0.10 MB/sec
|
||||
- 并发数: 9.60
|
||||
- 成功的执行: 100
|
||||
- 失败的执行: 0
|
||||
- 最长执行: 7.25
|
||||
- 最短执行: 2.82
|
||||
|
||||
**PHP5.6启用OpCache(PHP 5.6.0RC2 with OpCache 7.0.4-dev)错误结果,请阅读上面的说明!**
|
||||
|
||||
- 执行: 103 hits
|
||||
- 可用性: 100.00 %
|
||||
- 消耗时间: 59.99 secs
|
||||
- 传输的数据: 5.98 MB
|
||||
- 回应时间: 5.51 secs
|
||||
- 执行率: 1.72 trans/sec
|
||||
- 吞吐量: 0.10 MB/sec
|
||||
- 并发数: 9.45
|
||||
- 成功的执行: 103
|
||||
- 失败的执行: 0
|
||||
- 最长执行: 6.87
|
||||
- 最短执行: 2.52
|
||||
|
||||
**PHP-NG启用OpCache(20140718-git-6cc487d)错误结果,请阅读上面的说明!**
|
||||
|
||||
- 执行: 124 hits
|
||||
- 可用性: 100.00 %
|
||||
- 消耗时间: 59.32 secs
|
||||
- 传输的数据: 7.19 MB
|
||||
- 回应时间: 4.58 secs
|
||||
- 执行率: 2.09 trans/sec
|
||||
- 吞吐量: 0.12 MB/sec
|
||||
- 并发数: 9.57
|
||||
- 成功的执行: 124
|
||||
- 失败的执行: 0
|
||||
- 最长执行: 6.86
|
||||
- 最短执行: 2.24
|
||||
|
||||
**你觉得这测试怎样?我遗漏了什么没有?下一篇基准测试文章中你想看到什么呢?请在下面评论中回复!**
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://kinsta.com/blog/real-world-wordpress-benchmarks-with-php5-5-php5-6-php-ng-and-hhvm/
|
||||
|
||||
作者:[Mark Gavalda][a]
|
||||
译者:[GOLinux](https://github.com/GOLinux)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://kinsta.com/blog/author/kinstadmin/
|
||||
[1]:https://kinsta.com/blog/hhvm-and-wordpress/
|
Loading…
Reference in New Issue
Block a user