Drupal caching, speed and performance
Basic configuration
For an initial, quick performance tuning, see on your site:
Administer > Site configuration > Performance
with options for page cache, CSS optimization, and -in core since Drupal 6.x- block cache and JavaScript optimization. That standard optimization and database caching can be enough for many sites.
If better optimization is required, you might install one or two performance modules. For example, if the site is on a shared server, try Boost (static page caching for non-logged in visitors), complemented with Authcache -in CR's file or db mode- or Advanced Cache (for logged in members). If on a VPS or dedicated server, there are several suitable options: Boost, Authcache, Cache Router (which includes APC, Memcache...), etc. Memcache is also especially suitable when load-balancing multiple servers.
For extensive and detailed information, and more options on server optimization for Drupal, see the following selection of resources.
Drupal performance resources
Information and tutorials on optimizing Drupal's performance, speed, and scalability.
General Drupal performance
At drupal.org:
- High performance - Drupal group dedicated to solutions and approaches for high traffic, high performing Drupal sites.
- Modules: Performance and Scalability - Contributed modules: Advanced cache, Authcache, Block Cache Alter, Boost, Cache browser, CacheExclude, Cache Router, CSS Gzip, Javascript Aggregator, Memcache, Path Cache, Term lower name, etc. The list can be ordered by usage statistics, last release...
- Caching: Modules that make Drupal scale - Wiki page for comparison of performance and scalability modules.
- Server tuning considerations - Detailed collection of HowTo pages.
- Compatible with Memcache module? - Boost module issue including a solution to use several performance modules working together for logged in and non-logged in users.
- System: cron and caching - System, a required core module, provides system-wide defaults for storing (caching) web pages to improve efficiency, and performing other essential tasks.
- Throttle: congestion control - Throttle, an optional core module, provides a congestion control throttling mechanism for automatically detecting a surge in incoming traffic.
- Drupal guide to caching [draft 1] [2] - Preliminary versions, by Steve Dondley, for an introduction to the various caching mechanisms Drupal 6 uses to speed the site.
- Coding Standards and Performance Optimization - Group for Drupal developers, on optimized PHP coding.
- Performance and scalability - Deprecated forum with old threads; for current discussions see the two performance groups, specially High Performance for Drupal sites.
Other resources:
- Drupal performance - Articles by Drupal founder Dries Buytaert.
- Static Page Caching for Drupal 4.7 - Well-known article -also valuable for later Drupal versions-, with performance graphs comparing standard database cache and static page cache; by Arto Bendiken, creator of the Boost module.
- A beginner's guide to caching data - An article by Jeff Eaton, of Lullabot.
- Drupal Performance and Scalability - Online book, freely available at Tag1; see also articles on their blog.
- Drupal performance tuning and optimization for large web sites - Extensive collection of articles at 2bits; for instance, "Tips on speeding up your Drupal sites".
- Links and resources on Drupal performance tuning and optimization - Some additional articles on the web; a selection by 2bits.
- Performance - Articles on Drupal performance by Wim Leers, including the detailed "Improving Drupal's page loading performance".
- Tuning Drupal for a Weblog - A clear, easy read article on caching and performance by R.J. Lorimer.
- Performance and Scalability - Module list at Drupal Modules.
- Scaling Drupal - An open-source infrastructure for high-traffic Drupal sites - Multiple server configurations.
- Pressflow - A derivative of Drupal core providing enhanced performance, scalability and data integrity for high traffic sites. Open source, from Four Kitchens.
Videos, screencasts and slideshows
At drupal.org:
- Mini-Lesson: Devel Module Quickie - A quick screencast showing off the virtues and power of devel.module, a true must-have for any Drupal developer.
Other resources:
- Caching and performance improvements - Video and article from Drupalcon Szeged 2008.
- Increasing Performance on your Drupal Site - Screencast at Drupal Dude.
- Drupal Scaling and Performance - A presentation and a video from the June 2008 LA Drupal Users Group meeting.
- Drupal Caching and Optimization Strategies - Slide show from Melbourne Drupal Mini-Conference, February 3rd, 2007.
Case studies
At drupal.org:
- Staying online during a perfect storm of traffic - With links to "Improving Drupal's Performance with the Boost Module for the UN's Millennium Campaign" and other articles on that large international event.
- High volume Drupal sites - what do we need to know? - Thread including Intoxination's case study, with an average about a quarter million visitors a day and 400,000 page views.
- Digg Effect - Discussion on a case where normal cache (not aggressive) wasn't enough to deal with the Digg effect.
Other resources:
- Can a Drupal web site handle a million page views a day? - A case study by 2bits of a site that can handle this traffic on a single server, including a Digg front page; they use Memcache without the database caching.
- National Novel Writing Month and Drupal Scalability - Drupal scales really well, with a little help from performance modules, patches, etc.
- How to make Drupal run 8.5x faster in 5 minutes… - How a server using pretty large and hefty modules did it, by enabling Drupal’s built in caching, and installing APC.
- How I Survived a 2300% Traffic Increase with Drupal - A site on a shared hosting account, managing a traffic spike.
Monitoring and troubleshooting
At drupal.org:
- Drupal performance measurement & benchmarking - Methods to measure the performance of your web server.
- Devel - Module for developers that includes performance logging.
- ApacheBench - A module that provides both invocation of the ApacheBench program, as well as storing and reporting on cron-based invocations.
- Views 2.0 officially released! - Upon previewing, performance timers show how long your View took to build, query, and render; great for quick performance tuning.
- Benchmarking Drupal - A group.
Other resources:
- Drupal webserver configurations compared - Benchmarks measuring the performance of different configurations, by Dries Buytaert.
- Performance Logging and Monitoring: A module to log and monitor performance statistics for Drupal - This module is now part of the Devel module; article at 2bits, where more articles on monitoring, tuning and benchmarking are available.
