Filters
Content Type
Topics
Measure and Improve Drupal Speed with Performance Tests
Fast and furious – that’s how we expect our web pages to load. Even search engines favor sites that deliver faster experiences. The good news is that if you’re running your site on Drupal, there is incredible potential for high performance.
Drupal is known for its flexibility – it’s why developers love it. However, this same flexibility and modular design can sometimes mean that it can be a bit slower compared to simpler systems out of the box. That’s because all the extra features and customizations can weigh down your site if it’s not properly optimized.
However, with the right approach, you can supercharge Drupal to outperform the competition and provide your visitors with the ultimate experience. In this article, you will learn how to take your Drupal site’s performance to the next level!
Measuring Drupal Performance: Essential Metrics and Tools
Before diving into optimization techniques, you need to know what "good performance" actually means for a website. According to Google's Core Web Vitals thresholds:
- Largest Contentful Paint (LCP): Must be under 2.5 seconds to be considered "good"
- Interaction to Next Paint (INP): Should be under 200ms
- Cumulative Layout Shift (CLS): Should be under 0.1
Start by measuring your current performance against these targets:
1. Establish a Baseline With Site Speed Analysis
Before making optimizations, it’s crucial to measure your current performance. Google Lighthouse, a free and widely used performance auditing tool, provides a standardized way to analyze site speed, accessibility, SEO and best practices. You can run Lighthouse via Google Chrome DevTools, PageSpeed Insights or programmatically through the Lighthouse CLI.
Other performance benchmarking tools include:
- WebPageTest, which offers deep insights into loading behavior, including waterfall charts of resource loading.
- GTmetrix, which provides detailed reports on page speed and suggestions for improvement.
2. Monitor Performance With Real-User Data
Analyzing real-user experience helps identify performance trends over time. Key tools include:
- New Relic APM: Pantheon’s New Relic integration tracks response times, database queries and cache performance in real time.
- Google Analytics: This provides insights into page load times as experienced by users on different devices and network conditions.
- Third-party real user monitoring (RUM) tools: Solutions like Pingdom RUM or Dynatrace collect performance data directly from actual visitors, helping to identify regional or device-specific slowdowns.
3. Test Under Load Conditions
Simulating real-world traffic spikes ensures your site can handle surges without degrading performance. Consider:
- Apache JMeter, which is open-source load testing to simulate concurrent users.
- K6, which is a modern, developer-friendly load testing for stress testing APIs and web applications.
- Locust, which is a Python-based tool to simulate thousands of users accessing your site simultaneously.
4. Fine-Tuning Drupal Performance
Once you’ve analyzed and stress-tested your site, use the insights to optimize:
- Caching: Ensure Drupal’s built-in caching (e.g., Render Cache, Dynamic Page Cache) and Pantheon’s Edge Caching are properly configured.
- Database optimization: Use MySQL query analysis and indexing strategies to improve query efficiency.
- Asset optimization: Reduce CSS/JS bloat and leverage lazy loading for images to improve page speed.
In addition to using these tools, Drupal also comes with a few built-in tools to help monitor and understand where things might be slowing down. For instance, you can analyze database queries through database logging, track PHP memory usage and monitor cache hit/miss ratios – all useful insights.
Beyond these built-in capabilities, Drupal’s module repository offers powerful tools (like Devel and WebProfiler) to take your performance monitoring further.
While these tools are a great start, there's even more you can do to fine-tune your site's performance. Advanced strategies that you can implement manually – like optimizing your server-side setup, enhancing front-end performance or leveraging a WebOps platform with an advanced global CDN such as Pantheon – will take your Drupal performance up a notch.
Server-Side Optimizations for Drupal Speed
Pantheon automatically handles many server-side optimizations for its customers, so while you don’t need to worry about making these tweaks yourself, understanding them can help you appreciate how they impact your Drupal site’s speed and performance.
Server-side optimizations involve fine-tuning your server infrastructure to boost efficiency. For example, adjusting Drupal settings in Apache or Nginx can improve performance. This includes tweaking KeepAlive settings, optimizing worker processes and enabling compression modules like mod_deflate for Apache or gzip for Nginx to reduce server processing time.
Additionally, running the latest stable version of PHP offers better memory management and faster execution, leading to quicker page load times. Enabling OPcache can further enhance performance by storing precompiled PHP code in memory, reducing the need to recompile scripts for every request. This minimizes processing time and speeds up overall site performance.
On Pantheon, OPcache is already enabled by default, so no additional configuration is needed. However, if you're managing your own server, enabling OPcache typically requires modifying your PHP configuration file (php.ini). You can check if OPcache is active by running php -i | grep opcache or using a PHP info page.
Optimizing your database further boosts performance. High-performance databases like MariaDB can speed up query execution and data retrieval. It’s also essential to ensure your database tables are properly indexed for faster access to data, though over-indexing should be avoided as excessive indexing can slow down write operations and increase storage usage. To strike the right balance:
- Index primary and frequently queried columns (e.g., those used in WHERE, JOIN and ORDER BY clauses).
- Avoid indexing columns that change frequently since indexes need to be updated with each modification.
- Use composite indexes when filtering by multiple columns together instead of creating multiple single-column indexes.
- Regularly analyze query performance with tools like EXPLAIN or Pantheon’s database performance insights to ensure indexes are helping rather than hindering performance.
Caching Strategies To Supercharge Your Drupal Site
Caching is one of the most effective ways to improve your Drupal site’s performance. It reduces the load on your server and speeds up page delivery, which results in faster load times, reduced server strain and an overall better user experience.
Drupal comes equipped with several built-in caching functionalities designed to give your site a performance boost:
- Internal page caching stores the full HTML output of pages for anonymous users, which means Drupal doesn’t need to regenerate the entire page with each request. Instead, it serves up a pre-generated version, reducing server processing time significantly.
- Dynamic page caching allows you to cache content that’s generated on the fly. This ensures faster response times for content that changes frequently or is user-specific without having to rebuild everything from scratch each time.
- Block caching focuses on storing reusable components, like blocks or sections of a page, that appear across multiple pages. By caching these blocks, Drupal doesn’t need to re-render them every time, cutting down on rendering times for repeat visitors or across your site’s pages.
- HTTP caching uses HTTP headers to manage caching at the browser level and intermediary proxies, reducing the number of server requests and improving overall performance, especially for repeat visits.
You can also use the Cache Control Override module to override or set custom cache-control headers beyond Drupal’s default. If you need highly granular cache policies – such as different cache lifetimes for specific content types or pages – this module gives you direct control
These are great starting points, but they can be enhanced even further when paired with an advanced global CDN – like Pantheon’s.
Optimizing Caching With Pantheon’s Advanced Global CDN
While Drupal's built-in caching is powerful, a Content delivery network (CDN) can further improve your site's speed. Pantheon’s Advanced Global CDN, offered as part of our Pantheon WebOps platform, takes your Drupal site’s performance to a whole new level.
Brandfolder Image

Drupal’s internal caching only operates on the server hosting your site, meaning users farther from that server can experience slower load times due to the physical distance their requests have to travel.
With Pantheon’s CDN, your site’s content is distributed to edge servers worldwide, ensuring that no matter where your visitors are located, they’ll experience faster load times.
Another distinction is that Drupal handles caching at the application level, which works well but can become overwhelmed during high-traffic periods. Pantheon’s CDN, on the other hand, is designed to handle enormous traffic volumes with ease, offloading a significant portion of those requests from your server. This means your Drupal site can handle traffic surges effortlessly, thanks to the CDN’s built-in auto-scaling capacity, without putting additional strain on your hosting server.
It’s clear that Pantheon’s Advanced Global CDN provides faster page load times, reduced server load and an improved user experience for your Drupal site’s visitors no matter where they are.
However, for those of you not using Pantheon, you can use the CDN module to automate the rewriting of file URLs to serve static assets from your CDN of choice.
Front-End Optimization and Efficient Module Management
Front-end optimization is just as important as backend improvements to enhance your Drupal site’s performance. Here are the techniques:
- CSS and JavaScript aggregation and minification: By combining multiple CSS and JS files into fewer, smaller files, you reduce the number of requests made to the server, speeding up page loads. Drupal allows you to enable aggregation and minification directly in the configuration settings, making this an easy but impactful optimization.
- Lazy loading images: This technique delays the loading of images until they appear in the user’s active view, reducing initial load times and improving perceived performance. You can implement this in Drupal by adding the loading="lazy" attribute to images. You can also use Blazy or Image Optimization – popular modules for lazy loading images (particularly if you want more advanced or customizable behaviors than Drupal’s basic lazy loading).
- Image optimization: Serving appropriately sized images and using efficient formats like WebP can significantly cut down page load times. Drupal’s Image API Optimize WebP module makes it simple to convert and serve images in this faster-loading format.
To keep your front-end performance in check, you can complement Drupal's built-in tools with Pantheon’s New Relic Performance Monitoring. While Drupal’s native database logging helps track server-side issues, New Relic offers insights into front-end performance metrics like time to first byte (TTFB) and front-end resource load times. Pair this with Pantheon’s Advanced Global CDN and you get a powerful system for optimizing and tracking your site’s front-end performance!
Optimizing Performance with Module Management
For module management, start with a module audit using the Site Audit module. This tool helps identify performance-impacting modules that may be slowing down your site. For instance, resource-heavy modules like Statistics should be disabled if they’re not essential. Disabling unnecessary modules frees up resources, allowing your site to run more efficiently.
Next, think about caching modules like Redis and Memcache. For Pantheon users, the Redis Object Cache acts as an in-memory, key-value data store. It caches internal application objects and queries, significantly reducing database load and boosting page load speeds. This approach is especially beneficial for dynamic pages and logged-in users, as it eliminates the need for repeated database queries by serving cached content directly from memory.
You can also use Quicklink to prefetch links in the viewport during idle time, so when a user actually clicks a link, the page loads more quickly. This is especially beneficial on content-heavy sites with lots of internal links. It can significantly improve perceived performance because page transitions happen faster from the user’s perspective.
Lastly, integrate WebProfiler to keep an eye on performance issues. This module adds a toolbar at the bottom of every page, showing potential bottlenecks such as slow database queries and inefficient page load times, giving you actionable insights into optimizing your module management further.
However, we recommend using this module only in development or staging environments. If you use it in production, it can expose sensitive information and add performance overhead. Opt for server-level monitoring tools like New Relic (free for Pantheon users) or application performance monitoring (APM) services because these are safer for production environments.
Accelerate Your Drupal Site With Pantheon’s WebOps Platform
Image

Optimizing Drupal performance can be tricky, but the Pantheon WebOps platform simplifies the process with specialized tools to enhance your site’s speed and efficiency. It comes with its Advanced Global CDN, which ensures faster content delivery and reduced latency for users worldwide. Plus, the built-in New Relic monitoring provides deep insights into your Drupal application’s performance, helping you identify and resolve bottlenecks.
Hosting your Drupal site on Pantheon’s container-based architecture ensures automatic scaling and maximized performance. By combining these Pantheon features with the module management and monitoring strategies discussed here, you can boost your Drupal site’s performance to handle high traffic and growth.
Use Pantheon’s powerful tools with the strategies in this post and watch your Drupal site thrive, even under heavy traffic. Start using Pantheon now for free and experience the difference!