php apc vs eaccelerator vs xcache
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/930877/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
apc vs eaccelerator vs xcache
提问by Galen
Im doing research on which one of these to use and I can't really find one that stands out. Eacceleratoris faster than APC, but APC is better maintained. Xcacheis faster but the others have easier syntax.
我正在研究要使用其中的哪一个,但我真的找不到最突出的一个。 Eaccelerator比APC快,但 APC 维护得更好。Xcache速度更快,但其他的语法更简单。
Anyone have recommendations on which to use and why?
任何人都有使用的建议以及为什么?
回答by David Snabel-Caunt
APC is going to be included in PHP 6, and I'd guess it has been chosen for good reason :)
APC 将包含在 PHP 6 中,我想它被选中是有充分理由的:)
It's fairly easy to install and certainly speeds things up.
它很容易安装,当然可以加快速度。
回答by Evert
APC definitely. It's written by the PHP guys, so even though it might not share the highest speeds, you can bet on the fact it's the highest quality.
肯定是APC。它是由 PHP 人员编写的,因此即使它可能没有最高的速度,您也可以打赌它是最高质量的。
Plus you get some other nifty features I use all the time (http://www.php.net/apc).
此外,您还可以获得我一直使用的其他一些漂亮功能(http://www.php.net/apc)。
回答by gbjbaanb
In the end I went with eAccelerator - the speed boost, the smaller memory footprint and the fact that is was very easy to install swayed me. It also has a nice web-based front end to clear the cache and provide some stats.
最后我选择了 eAccelerator - 速度提升、内存占用更小以及安装非常容易这一事实让我动摇。它还有一个不错的基于 Web 的前端来清除缓存并提供一些统计信息。
The fact that its not maintained anymore is not an issue for me - it works, and that's all I care about. In the future, if it breaks PHP6 (or whatever), then I'll re-evaluate my decision and probably go with APC simply because its been adopted by the PHP developers (so should be even easier to install)
它不再维护的事实对我来说不是问题 - 它有效,这就是我关心的全部。将来,如果它破坏了 PHP6(或其他),那么我将重新评估我的决定,并且可能仅仅因为 APC 被 PHP 开发人员采用(所以应该更容易安装)
回答by Ryan Schumacher
It may be important to point out the current stable, unstable and dev versions of each (including date):
指出每个版本的当前稳定、不稳定和开发版本(包括日期)可能很重要:
APC
APC
http://pecl.php.net/package/apc
http://pecl.php.net/package/apc
dev dev 2013-09-12
3.1.14 beta 2013-01-02
3.1.9 stable 2011-05-14
Xcache
缓存
dev/3.2 dev 2013-12-13
dev/3.1 dev 2013-11-05
3.1.0 stable 2013-10-10
3.0.4 stable 2013-10-10
eAccelerator
电子加速器
https://github.com/eaccelerator/eaccelerator
https://github.com/eaccelerator/eaccelerator
dev dev 2012-08-16
0.9.6-rc1 unstable 2010-01-26
0.9.5.1 stable 2007-05-16
回答by Prom3th3an
In all tests I have seen, eAccelerator performs faster than any other cache out there and uses less memeory to do so. It comes with a nifty script to view cache utilisation and clear the cache etc. eAccelerator is compatible with xdebug and Zend Optimizer.
在我看到的所有测试中,eAccelerator 的执行速度比任何其他缓存都要快,并且使用更少的内存。它带有一个漂亮的脚本来查看缓存利用率和清除缓存等。 eAccelerator 与 xdebug 和 Zend Optimizer 兼容。
APC is being included in PHP because it is being maintained by the PHP developers. It performs very well, but not as good as eAccelerator. And it has compatability issues with Zend Optimizer.
APC 包含在 PHP 中,因为它由 PHP 开发人员维护。它的性能非常好,但不如 eAccelerator。它与 Zend Optimizer 存在兼容性问题。
Xcache was made by the developers of lighttpd, benchmarks show it performs similiarly to eAccelerator, and faster than APC.
Xcache 是由 lighttpd 的开发者制作的,基准测试表明它的性能与 eAccelerator 相似,并且比 APC 更快。
So which is the best?
那么哪个是最好的呢?
APC = Great if you want an easy cache that will always work with PHP, no fuss. eAccelerator = If you have time to maintain it, keep it up todate and understand how it works, it will perform faster. Long term support not as certain as APC because APC is done by the PHP devs.
APC = 如果您想要一个始终与 PHP 一起使用的简单缓存,那就太好了,不用大惊小怪。eAccelerator = 如果您有时间维护它,让它保持最新状态并了解它的工作原理,它会运行得更快。长期支持不如 APC,因为 APC 是由 PHP 开发人员完成的。
回答by devarni
I tested eAccelerator and XCache with Apache, Lighttp and Nginx with a Wordpress site. eAccelerator wins every time. The bad thing is only the missing packages for Debian and Ubuntu. After a PHP update often the server doesn't work anymore if the eAccelerator modules are not recompiled.
我使用 Apache、Lighttp 和 Nginx 以及 Wordpress 站点测试了 eAccelerator 和 XCache。eAccelerator 每次都获胜。坏事只是缺少 Debian 和 Ubuntu 的软件包。在 PHP 更新后,如果不重新编译 eAccelerator 模块,服务器通常不再工作。
eAccelerator last RC is from 2009/07/15 (0.9.6 rc1) with support for PHP 5.3
eAccelerator 最后一个 RC 来自 2009/07/15 (0.9.6 rc1),支持 PHP 5.3
回答by miele
I always used APC with php 5.1 and 5.2, but I had a lot of (random) errors using APC with php 5.3: Strange blank pages, random out-of-memory errors. They all disappeared when I disabled APC. But that was no option, as it is running a high-volume website.
我总是在 php 5.1 和 5.2 中使用 APC,但是在 php 5.3 中使用 APC 时出现了很多(随机)错误:奇怪的空白页面,随机内存不足错误。当我禁用 APC 时,它们都消失了。但那是没有选择的,因为它正在运行一个高容量的网站。
So I tried eaccelerator. So far it has been rock solid and the speed increase is even bigger than with APC. The APC guys really need to spend some time on bugfixing.
所以我尝试了eaccelerator。到目前为止,它一直坚如磐石,速度提升甚至比 APC 还要大。APC 人员真的需要花一些时间来修复错误。
回答by rg88
I think APC is the way to go unless you are using Zend Optimizer on the site. APC is incompatible with Zend Optimizer so in that case you will need to go with something like eAccelerator.
我认为 APC 是可行的方法,除非您在网站上使用 Zend Optimizer。APC 与 Zend Optimizer 不兼容,因此在这种情况下,您需要使用 eAccelerator 之类的东西。
回答by Matt Dryden
Even both eacceleator and xcache perform quite well during moderate loads, APC maintains its stability under serious request intensity. If we're talking about a few hundred requests/sec here, you'll not feel the difference. But if you're trying to respond more, definetely stick with APC. Especially if your application has overly dynamic characteristics which will likely cause locking issues under such loads. http://www.ipsure.com/blog/2011/eaccelerator-as-zend-extension-high-load-averages-issue/may help.
即使 eacceleator 和 xcache 在中等负载下都表现得很好,但 APC 在严重的请求强度下仍能保持其稳定性。如果我们在这里讨论的是每秒几百个请求,您不会感觉到区别。但是,如果您想做出更多回应,请务必坚持使用 APC。特别是如果您的应用程序具有过于动态的特性,这可能会在此类负载下导致锁定问题。http://www.ipsure.com/blog/2011/eaccelerator-as-zend-extension-high-load-averages-issue/可能会有所帮助。

