Magento is a great piece of software, but people often complain about it’s performance. Speeding up Magento is therefor one of our favourite challenges. We did some tests to determine how we can improve our configuration to speed up the Magento installations hosted on our servers.

Speeding up Magento tests

We took a basic Magento install (v1.1.2) with sample data using this script from the Magento wiki. We then tested the opening time of the front page against different server configurations.  Every configuration was opened 300 times with a GET command and the wall clock time was logged.  The tests were done during the working day thus with considerable load on our webcluster.

We used four different hardware setups:

  1. byte cluster: our shared cluster as available for the customers
  2. web13: a server removed from the cluster (called web13), so same hardware but no interfering traffic
  3. localdisk:the same web13 server but the site was installed in /var/www, thus on a server’s local disk
  4. localnfs: web13 but on a local NFS mount (/var/www-local exported and mounted as /var/www to test NFS impact without network latency

Other configuration options were:

  • mod php/cgi – the site was run as mod_php or as a standalone CGI script
  • php opcode caching / nocaching – we tested APC and XCache

Results

Magento tests MOD

 

Magento tests CGI

 

Observations

  1. the use of NFS has great impact on performance when using mod php
  2. Magento run with mod_php over NFS is very slow.
  3. opcode caching gives visible performance gains for mod_php installations on a local disk
  4. opcode caching does not help with CGI (which is logical – the code is cached every time the script is run)

Open questions

  1. Why is mod php so slow when served from NFS? It must be some locking issue, but is it due to Magento using flock or is it rather a Apache/mod_php + NFS issue?
Scan je eigen Magento shop op veiligheidslekken

Related Post