LiteMage 1.3 Delivers Ultimate Magento First Page View Performance
There is a wealth of statistics ( 1, 2, 3 ) pointing out the extreme impatience of online shoppers (conversion rates dropping 7% due to 1 second page load delays, 38% due to 5 second page loads, vast numbers of visitors abandoning sites that are perceived as slow to load, etc.).
For new store visitors, the first page loading speed is a critical factor in visitor retention. With an industry median of 7.25 seconds, and the so called “optimal” 3 second threshold, what kind of initial impression does a vanilla, non-cached Magento store offer new visitors? Let's have a look.
No Cache: LiteSpeed vs. Apache vs. Nginx
We set up identical hardware platforms* running a vanilla Magento store on LiteSpeed Enterprise 5, Apache 2.4 and Nginx 1.1.15**, and tested each setup with varying numbers of new, first time visitors. We measured the average first page load speed for each of the servers.
While LiteSpeed Enterprise consistently outperforms the other servers (with 30% to 50% faster load times), as the number of concurrent visitors increases, performance becomes unacceptable across all three platforms.
Full Page Cache to the Rescue?
Common knowledge tells us that to speed up a Magento store we should add a full page cache extension, so we added LiteMage 1.2 to our LiteSpeed Enterprise configuration, and Turpentine 0.7.0 + Varnish 4.1.3 for both Apache and NGINX, and reran our tests.
Interestingly, while the addition of LiteMage 1.2 significantly sped up page loads for LiteSpeed Enterprise (by over 40% vs. uncached LiteSpeed Enterprise) and widened the gap between our server and the others, the results also indicate that the Turpentine+Varnish solution did not improve the first page load speed, and in some cases worsened performance. To understand why, see "When Caching Fails" below.
When Caching Fails
So why did adding Turpentine+Varnish fail to speed up the first page load?
Using Turpentine+Varnish entails setting up a separate reverse proxy Varnish server that communicates with the Magento backend utilizing the Turpentine plugin. Visitors hit the Varnish front end, which then has to request the page content from Apache or NGINX running Magento. For established (repeat) visitors, the Magento session is already set up, and Varnish is able to serve the page from cache rather than executing backend code. For new visitors, however, a new Magento session has to be initialized, a new "form key" generated, and the private cache (for punched holes) needs to be populated.
This costly operation negates any performance gained from serving the majority of the page from cache. In our testing, the results would have been worse for the non-LiteMage solutions if the page had multiple holes to fill, as they would have executed the Magento framework initialization multiple times. Luckily (for our competitors), the page we tested had just one hole to fill.
On the other hand, LiteMage, our advanced cache solution for Magento, is engineered to minimize Magento core code execution. Unlike competing solutions, our unique ESI inline object technology employs a single backend call for complete page generation, and has allowed us to consistently outperform others (see 'Real User Performance vs. "Benchmarks"' below).
Real User Performance vs. "Benchmarks"
In all our tests, we present results that would apply to a real user visiting the store. While others have published "benchmark" numbers that show much better competitor performance, the best advice we can offer is caveat emptor (buyer beware): competing solutions like Turpentine have added special code which detects benchmark tools (using User-Agent signatures), and when a benchmark tool is detected, they skip calling the backend in order to make the first page appear to load fast. We consider this approach cheating, as it does not reflect real visitor experience and offers an unrealistically optimistic impression of performance.
While the LiteMage 1.2 first page load time was impressive, it still showed gradual deterioration when the number of concurrent users rose over 100. We thought we could do better.
A Real Solution
In our new LiteMage 1.3 and LiteSpeed 5.1.10 release, we implemented an innovative technique where all first page content is served entirely from cache, completely eliminating the need for backend execution, session creation and form key generation. And unlike competing "benchmarks", all Magento functionality is preserved, and real users see real, dramatic results.
Your Magento stores now get the same lightning fast speed for first page load times as for subsequent pages, 0.25 seconds(!) in our benchmark testing environment. LiteMage 1.3 consistently delivers 10x better first page view speed than Turpentine, with no significant deterioration even at extremely high concurrent user numbers.
Sub-second page load is critical in visitor retention, and only LiteSpeed is able to deliver this level of performance for your Magento site.
** We are not sure why in these test scenarios NGINX showed lower performance than Apache - if you have suggestions on tuning the NGINX configuration for better performance, please let us know.