Magento is a wonderful way of quickly and inexpensively creating an ecommerce website, but it does have some major downsides. The complexity of theming it is well know, as is the extremely mediocre performance on typically web hosting. There are any number of methods of speeding things up, but on the face of it the most straightforward method is to enable the Magento cache to use APC. Switching the caching mechanism from using the filesystem (which stores cached data in /var/cache) to use APC (which caches in memory) should lead to a doubling in the number of pages served per second.
However, when I was running some tests I was actually seeing a decrease in performance with APC enabled in comparison to the default setup. This was odd, as in the past I’ve used APC with custom web applications that I have created and have never seen performance decrease. APC comes with a useful monitoring console which you can use to view the current state of the cache (shown below).
In an ideal world you will have a very high percentage of cache hits, very little memory fragmentation and a reasonable number of free MB. In my case APC only had 32MB RAM available, which meant that the Cache was constantly “churning”. As a minimum you should have 64MB memory available to APC when running Magento, otherwise performance will drop, rather than increase.
Having problems with slow performance on your Magento web site? Need some help squeezing some extra speed out of it? Why not get in touch?