No results found.

Magento 2 Performance

Varnish caching, frontend optimisation, build tuning, and performance monitoring - with real-world benchmarks and production-tested techniques.

Magento 2 performance is one of the most common pain points for merchants and agencies alike. Out of the box, an uncached Magento page can take 500ms to several seconds to render - but with the right caching strategy, frontend optimisations, and infrastructure tuning, you can serve pages in under 10 milliseconds and handle thousands of concurrent users.

The key to Magento performance is a layered approach: Varnish for full page caching, Redis for session and backend cache, Critical CSS to eliminate render-blocking resources, and Magepack for JavaScript bundling. But configuration matters enormously - a misconfigured Varnish setup or a single non-cacheable block in your layout XML can silently destroy your cache hit rate and tank performance.

These guides cover the full performance stack with real-world benchmarks and production-tested approaches. I've debugged cache performance issues across dozens of Magento stores, identified the specific layout blocks breaking FPC, and optimised static content deployment builds that were taking 20+ minutes down to a fraction of that. Every technique here has been validated in production.

Performance Articles

Blog posts on Varnish, caching, frontend optimisation, and build performance for Magento 2.

All performance posts

Verbose Magento 2 DB Schema Status

Ever found yourself wondering why a store required downtime to deploy? Or even the case where `setup:db:status` constantly reports `Declarative Schema is not up to date` despite you just update it?

· 2 min
  • magento2
  • devops
  • debugging
  • +1

Debouncing Magento 2 FPC Purge Requests

Delaying Magento 2 full page cache purges to a set schedule, to improve frontend performance and reduce system load during busy periods such as sales events like black friday.

· 1 min
  • magento2
  • adobe-commerce
  • devops
  • +3

Debugging Varnish Cache Performance in Magento 2

Quick reference guide to debugging Varnish usage within Magento 2, covering cache utilisation, hit & miss rate logging, identifying the source of purge requests

· 2 min
  • magento2
  • varnish
  • debugging
  • +1

How to install & configure PHP SPX in Warden for Magento 2

A simple installer script to allow you to setup and configure PHP SPX in a Warden environment for Magento 2

· 2 min
  • magento2
  • devops
  • performance
  • +3

Comparing Magento 2 DB Schema Changes

Generate a diff report for the difference between the Magento 2 DB Schema in code, and the schema currently deployed.

· 1 min
  • magento2
  • debugging

Finding Magento 2 Uncacheable Blocks

Quick and easily identify what XML blocks are breaking your full page caching, by injecting a small piece of code into any template.

· 1 min
  • magento2
  • debugging

Simple 2 line fix for Polyfill.io Malware in Magento 2

A quick and easy two line fix configuration fix for the Polyfill.io Magento 2 Malware

· 2 min
  • magento2
  • nginx
  • devsecops
  • +1

Magento 2 - Configuring Nginx Rate Limiting

A simple, no nonsense overview on how to configure rate limiting via Nginx for a Magento 2 website. Including IP and UserAgent whitelisting.

· 2 min
  • magento2
  • nginx
  • devops

Performance & Caching Docs

In-depth guides for Varnish, Critical CSS, JavaScript bundling, and cache debugging.

All performance docs

Performance Tools & Projects

Open-source tools for caching, performance testing, and optimisation.

All projects
🚀

Aero Commerce Varnish Integration

Experimental Varnish module for Aero Commerce demonstrating dramatic performance improvements from 21 reqs/s to 3.3k reqs/s with p95 latency drop from 6s to 51ms.

157x
Throughput
6s → 51ms
p95 Latency

Frequently Asked Questions

How do I improve Magento 2 page load speed?

The most impactful improvements are: configuring Varnish full page cache correctly (this alone can improve response times from seconds to milliseconds), implementing Critical CSS to eliminate render-blocking resources, using Magepack for JavaScript bundling, and finding/fixing non-cacheable layout blocks that prevent FPC from working. Server-side optimisations like PHP OPcache tuning and database query optimisation also help.

Why is Varnish important for Magento 2?

Varnish sits in front of Magento and serves cached pages directly from memory, reducing response times from 500ms+ to under 10ms for cached pages. Without Varnish, every page request hits PHP and MySQL. With Varnish properly configured, your Magento store can handle 10-100x more concurrent users. It's not optional for production Magento stores - it's essential.

How do I find what's breaking Magento 2 full page cache?

Use the non-cacheable block debugging technique: add cacheable="false" detection to your layout XML analysis. Common culprits include poorly coded third-party modules that add non-cacheable blocks to every page, dynamic content blocks without proper ESI/AJAX configuration, and custom layout XML that accidentally sets cacheable="false" on container blocks.

What is the best caching strategy for Magento 2?

A layered approach works best: Varnish for full page cache (FPC), Redis for session storage and backend cache, Elasticsearch/OpenSearch for catalog search, and a CDN like Cloudflare for static assets and geographic distribution. Monitor cache hit rates actively - a well-configured Magento store should see 85-95% Varnish hit rates on cacheable pages.

Is your Magento store running slow?

Performance tuning has been a key part of my Magento work, including Varnish configuration, caching strategies, and frontend optimization. Based in the UK, I often discuss performance challenges and techniques with fellow engineers.