More Related Content


Making Magento run faster configuring Redis as back-end

  1. About Neev Web Mobile Magento eCommerce SaaS Applications Video Streaming Portals Rich Internet Apps Custom Development iPhone Android Windows Phone 7 HTML5 Apps Cloud AWS Consulting Partner Rackspace Joyent Heroku Google App Engine Key Company Highlights 250+ team with experience in managing offshore, distributed development. Neev Technologies established in Jan ’05 VC Funding in 2009 By Basil Partners User Interface Design and User Experience Design Part of Publicis Groupe Member of NASSCOM. Performance Consulting Practices Development Centers in Bangalore and Pune. Quality Assurance & Testing Outsourced Product Development Offices at Bangalore, USA, Delhi, Pune, Singapore and Stockholm.
  2. The Caching Method Currently Employed in Magento • Magento uses the default two level caching of the Zend framework, a fast cache and a slow one as configured in the file Local.xml • The fast cache is configured to APC/Memcache, whereas the slow one is file system based
  3. Advantages and Disadvantages of Default Cache • Magento stores its cache entries in the file system. This model does have an advantage. We don’t need any additional software to keep it running • The default model, however, proves to be more of a disadvantage than an advantage. This is because Magento stores its cache entries in the file system in the /var/cache folder. This is fine as long as the traffic is minimal. The Magento cache is also organized by tags, this means you have cache entries which belongs to a cache group • Once the traffic increases, the number of cache entries in the file system increase, and reading and writing to the file system becomes slower and slower • Magento clears cache entries by tag. A typical scenario is one where, after placing an order or saving a product, it makes sure that the block caches are updated on the store. While clearing entries by cache tag, Magento has to open each file to check if the cache entry belongs to the cache group • Consider a Magento store with 1000 products, it would have a cache size of 50 MB. There would be at least 3500 entries(individual files) and the process would be very slow and certainly not feasible in the long run
  4. 2 Ways of Achieving Better Performance in this Model 1. Use SSDs( Solid State Drives) instead of normal hard drives 2. Put the /var/cache directory in tmpfs
  5. Advantages of Configuring Redis as Back-End • Very fast cache back end with excellent support for cache tags, the slower file system cache is ruled out • Highly recommended in multi-server environments where you have more than one web server • It has been tested on high traffic Magento stores with more than 500,000 visitors / day and the performance has been great
  6. Requirements for a Working Redis Back-End • Redis must be installed on the server. • PHP Extension PHPRedis must be installed. • Magento extension “Cm_Cache_Backend_Redis” must be installed.
  7. Installation and Configuration For Redis : Initial Steps 1. Install redis(2.4+ required) 2. Install phpredis 3. Install the magento extension “Cm_Cache_Backend_Redis” 4. Edit your app/etc/local.xml. Follow screenshot below :
  8. Installation and Configuration of Redis : Final Step Restart the PHP process and it will make sure the cache is being stored in Redis as shown below :
  9. Clients
  10. Partnerships
  11. Neev Information Technologies Pvt. Ltd. India - Bangalore India - Pune The Estate, # 121,6th Floor, #13 L’Square, 3rd Floor Dickenson Road Parihar Chowk, Aundh, Bangalore-560042 Pune – 411007. Phone :+91 80 25594416 Phone : +91-64103338 USA Sweden Singapore Neev AB, Birger Jarlsgatan 1121 Boyce Rd Ste 1400, Pittsburgh PA 15241 Phone : +1 888-979-7860 #08-03 SGX Centre 2, 4 53, 6tr, Shenton Way, 11145, Stockholm Singapore 068807 Phone: +46723250723 Phone: +65 6435 1961 For more info on our offerings, visit