Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Performance magento编译模式与apc_Performance_Magento_Compilation_Magento 1.7_Apc - Fatal编程技术网

Performance magento编译模式与apc

Performance magento编译模式与apc,performance,magento,compilation,magento-1.7,apc,Performance,Magento,Compilation,Magento 1.7,Apc,Magento有一种编译模式,在这种模式下,您可以编译Magento安装的所有文件,以便创建单个包含路径以提高性能 在我当前的车间设置中,我已经将apc配置为用作操作码缓存,并且正在利用其性能提升 我的问题是: 1) 与magento编译模式相比,使用apc有什么优势吗?反之亦然?我为magento提供了一台专用服务器,并希望获得最大的性能增益 2) 将这两者结合使用是否有用?为什么,或者为什么不呢?它们做不同的事情,所以两者结合在一起很好。APC通常会比简单地启用编译带来更大的性能增益,但两者

Magento有一种编译模式,在这种模式下,您可以编译Magento安装的所有文件,以便创建单个包含路径以提高性能

在我当前的车间设置中,我已经将apc配置为用作操作码缓存,并且正在利用其性能提升

我的问题是:

1) 与magento编译模式相比,使用apc有什么优势吗?反之亦然?我为magento提供了一台专用服务器,并希望获得最大的性能增益


2) 将这两者结合使用是否有用?为什么,或者为什么不呢?

它们做不同的事情,所以两者结合在一起很好。APC通常会比简单地启用编译带来更大的性能增益,但两者兼而有之会让您两全其美


请记住,当您启用编译功能时,您需要在进行任何代码更改或更新/安装模块之前禁用它,然后再重新编译。

正如@JohnBoy在其回答中所说的,这两种功能都可以结合使用。 除此之外,另一个问题是,使用apc是否会使编译变得多余

因此,我通过一些
sakege
负载测试验证了该场景,总体而言,有一定的改进

这是测试结果

seake--concurrent=50--internet--file=url.txt--verbose--benchmark--reps=30--log=compilation.log

-------------|-------------------------------------------------------------------------------------------------------------------------| 
|Compilation |Date & Time         |Trans  |Elap Time  |Data Trans  |Resp Time  |Trans Rate  |Throughput  |Concurrent  |OKAY    |Failed |
-------------|-------------------------------------------------------------------------------------------------------------------------| 
|No          |2013-09-26 12:27:23 |   600 |    202.37 |          6 |      9.79 |       2.96 |       0.03 |      29.01 |    600 |      0|
-------------|-------------------------------------------------------------------------------------------------------------------------|
|Yes         |2013-09-26 12:34:05 |   600 |    199.78 |          6 |      9.73 |       3.00 |       0.03 |      29.24 |    600 |      0|
-------------|-------------------------------------------------------------------------------------------------------------------------|
|No          |2013-09-26 12:59:42 |  1496 |    510.40 |         17 |      9.97 |       2.93 |       0.03 |      29.23 |   1496 |      4|
-------------|-------------------------------------------------------------------------------------------------------------------------|
|Yes         |2013-09-26 12:46:05 |  1500 |    491.98 |         17 |      9.59 |       3.05 |       0.03 |      29.24 |   1500 |      0|
-------------|-------------------------------------------------------------------------------------------------------------------------|
存在一定程度的差异;然而,好的一面是,无论进步多么微小,总有一些进步

所以我们可以两者兼用


这里唯一的额外开销是在模块更改后禁用和重新编译。

php.ini系统中的realpath\u cache\u size=128k和realpath\u cache\u ttl=7200,因为添加急需的模块会导致编译产生你所见过的最糟糕的问题。您将无法使用编译器,但apc+realpath_缓存可为您提供可用的性能提升。此外,如果您希望进一步加快页面速度,则不应依赖默认的文件缓存。如果要使用文件缓存,请至少使用ram驱动器。更好地使用memchache,或者更好地使用redis:)@Fantus这很有趣:)@FiascoLabs将检查您的建议。@anshol昨天发布了1.8 CE,redis的缓存+会话处理选项现在默认集成了详细信息: