我应该在生产中启用OpCache吗? php 7.0是否有基准? [英] Should I enable OpCache in production? Any benchmark for php 7.0?

查看:50
本文介绍了我应该在生产中启用OpCache吗? php 7.0是否有基准?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该在生产中启用OpCache吗? php 7.0是否有基准? 是否有任何基准可以说明启用和调整opcache可以使PHP 7.0服务器上的Laravel应用程序受益多少?分享您的经验也很好.

Should I enable OpCache in production? Any benchmark for php 7.0? Is there any benchmark that tells how much a Laravel application on a PHP 7.0 server can benefit from enabling and tuning opcache? It would also be nice to share your experience.

推荐答案

我已在生产环境中启用了opcache,并且没有任何问题.无疑有性能上的改进,所以我建议启用它.

I have opcache enabled in production and have had no problems. There is undoubtedly a performance improvement so I would recommend enabling it.

我不是Laravel开发人员,但是那里有很多性能比较.例如,快速的Google搜索显示 https://kinsta.com/blog/the-definitive-php-7-final-version-hhvm-benchmark/,其中具有Laravel(带有和不带有opcache)基准以及基于Laravel的产品(OctoberCMS,PyroCMS,Flarum)

I'm not a Laravel developer, however there's a bunch of performance comparisons out there. For example, a quick Google search reveals https://kinsta.com/blog/the-definitive-php-7-final-version-hhvm-benchmark/ which has a Laravel (with and without opcache) benchmark as well as Laravel based products (OctoberCMS, PyroCMS, Flarum).

虽然没有明确的基准,但值得一看 https://www.techempower.com/benchmarks/#section=data-r12&hw=peak&test=fortune&l=13yebk (适用于PHP框架基准测试). opcache尚未经过特别测试,但是HHVM可以使您大致了解性能改进的情况.

While there's no definitive benchmark, it's worth looking at https://www.techempower.com/benchmarks/#section=data-r12&hw=peak&test=fortune&l=13yebk for PHP framework benchmarks. opcache is not specifically tested, but HHVM is which should give you a rough idea of performance improvement.

这篇关于我应该在生产中启用OpCache吗? php 7.0是否有基准?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆