8 June 2016

Magento Varnish how to - part two


Part Two


Welcome back to part two of this mini series on how to get a Magento Varnish cache on your Magento store.  Part one talked about why Varnish is something you should be using, and this part talks about the kind of performance increase you should be seeing by using Varnish on your store.  The next and final part shows you how easy it is to actually get Varnish working on your Magento using Evolved Caching.

Magento Varnish performance

 

So we've hopefully convinced you that using Varnish on your Magento store is a great idea, but what kind of performance increase are you likely to see?  This does depend to some extent on the spec of the server Varnish is running on, but whatever the spec Varnish is going to deliver it's cached content many, many times faster than having Magento process the request.  To give you an idea, here are some benchmarks we ran with an Evolved Caching Magento Varnish setup as described in the last part of this mini series.  The times shown below are the time it takes the server to generate a full page of HTML content to deliver to a customers browser (being the part that Magento is slow at), it doesn't take into account connection speed which can vary greatly for each user.

Home page

With standard Magento caches enabled the server takes an average of 175ms to build this page of HTML.

With Varnish serving a cached page the server takes an average of 18ms to build this page of HTML

Varnish is therefore around 10x faster in this case.

CMS page

With standard Magento caches enabled the server takes an average of 140ms to build this page of HTML.

With Varnish serving a cached page the server takes an average of 18ms to build this page of HTML

Varnish is therefore around 8x faster in this case.

Product page

With standard Magento caches enabled the server takes an average of 370ms to build this page of HTML.

With Varnish serving a cached page the server takes an average of 18ms to build this page of HTML

Varnish is therefore around 21x faster in this case.

Custom page

With standard Magento caches enabled the server takes an average of 480ms to build this page of HTML.

With Varnish serving a cached page the server takes an average of 18ms to build this page of HTML

Varnish is therefore around 27x faster in this case.


So you can see there is quite a difference in the time it takes the various pages to be built by Magento, while Varnish keeps a consistent 18ms to serve it's cached content throughout.  Because more complex pages take a longer amount of time to build by Magento, it makes sense that you see a greater performance benefit on these pages than on simple pages which are quick for Magento to build.  Category and product pages are obviously key to every Magento store and it's on these pages you are likely to see the greatest improvement.  So the longer and more complex your stores pages are, the greater performance benefit you are going to see by using Varnish.  If you want to see more, you can find the benchmarks for Evolved Caching here - the performance of Evolved Caching's own full page cache is virtually identical to Varnish so these figures are directly comparable to the same setup using Varnish.  Our store also uses Varnish so you are welcome to browse and test there as well.

Thanks for reading part two of this Magento Varnish cache mini series, the last part shows you how easy it is to get Varnish working on your Magento store by using Evolved Caching.

No comments:

Post a Comment