PHP OpCode Caching and Magento

First up in our series We Host Magento Better! is a look at how we use PHP OpCode caching to improve the performance of the Magento stores that we host…

What is OpCode Caching?

PHP’s OpCode caching is defined as

“Storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.”

Put more simply, it caches some of the PHP code for files so they do not have to be processed for each request.

This can lead to dramatic improvements in speed and a decrease in CPU usage.

Are there different settings for OpCode caching?

OpCode caching is not an on or off setting. There are a number of parameters you can set, and how you set them determines just how effective this function is for Magento stores.

Items such as:

  • Reserved memory
  • Number of files that can be cached
  • How often files are checked for changes
  • Proper blacklisting to avoid redundancy or not needed caching

We have developed a best practices set up for our Magento clients that helps them get the most out of OpCode caching, while minimizing the resources used to do so.

This initial set up is only half the battle though…

Monitoring and proactive action are key for OpCode success

Unfortunately, although many web hosts may enable OpCode caching for Magento hosting, and some may even tune the settings initially, most web hosts do not monitor OpCode caching resource usage and performance on an ongoing basis. This can lead to improperly configured settings, which can reduce performance or lead to problems.

At LexiConn, we monitor the usage and performance of each server / environment that utilizes PHP OpCode caching. If an alert level is reached, we take action to adjust the settings to make sure OpCode caching is performing optimally. This simple monitoring and adjustment can make a large difference over time for a Magento store.

This is just one area where we do things a bit differently from other web hosts when it comes to Magento hosting. A proper set up, coupled with ongoing monitoring and adjustments can help a Magento merchant see consistent performance gains over the life of their online store.

Don’t settle for a one size fits all approach in this area.

Looking for a web host that understands ecommerce and business hosting?
Check us out today!

Leave a Reply