Pregunta

Magento has a compilation mode in which you can compile all files of a Magento installation in order to create a single include path to increase performance. http://alanstorm.com/magento_compiler_path http://www.magentocommerce.com/wiki/modules_reference/english/mage_compiler/process/index

In my current shop setup, I have already configured apc to be used as an opcode cache, and am leveraging its performance gains. http://www.aitoc.com/en/blog/apc_speeds_up_Magento.html

My question are:

1) Is there any advantage of using apc over magento compilation mode, or vice versa? I have a dedicated server for magento, and am looking for maximum performance gains.

2) Will it be useful to use both of these togather? Why, or why not?

¿Fue útil?

Solución

These do different things so both together is fine. APC will usually give the greater performance gain that simply enabling compilation, but doing both gives you the best of both worlds.

Just remember when you have enabled compilation you need to disable it before making any code changes or updating/installing modules, then recompile after.

Otros consejos

As @JohnBoy has already said in his answer, both can be used in conjunction. Beyond that, another concern was, if using apc would make the compilation redundant.

So I verified the scenario with some siege load tests and overall, there is definite improvement happening.

Here are the test results

siege --concurrent=50 --internet --file=urls.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|
-------------|-------------------------------------------------------------------------------------------------------------------------|

There was a certain amount of variance; however, the good thing was that there was always some improvement, however miniscule be it.

So we can use both.

The only extra overhead here is disabling and recompiling after module changes.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top