Home

Drupal Performance and Scalability Patches

Tagged with

The following collection of patches are useful performance and scalability tweaks that can be applied to Drupal websites. This collection will continue to grow, and is being maintained as a reference page for our online performance and scalability book. As new versions of Drupal are released, updated version of these patches will be added to this page.

To learn more about how these patches work, where they came from, and if they've been merged upstream, you can click the readme link following each patch's brief description. We welcome all feedback, and suggestions for other patches that should be included in this collection.


  • CDN
    Patch Drupal core to serve static content from a Content Delivery Network (CDN). This patch will serve user-uploaded files (if using public downloads), CSS files, JavaScripts, and theme images from a CDN. [readme]

  • drupal_lookup_path
    Optimize a database query in drupal_lookup_path to not count all rows in the url_alias table on each page load. Useful for websites with a large url_alias table and a transactional database, on which the original query is showing up in the slow query log. [readme]

  • external page-cache
    Serve anonymous pages directly from a cache without accessing the database. Requires that sessions and the page cache be managed externally, such as by memcache, and that aggressive caching is enabled. [readme]

  • load cache
    Introduces caching for both nodes and users. While it will still help performance without using memcache, it is recommended that you enable the memcache module to cache this data in memory for optimal performance. [readme]

  • page-cache lock
    Prevent cache stampede when updating the page-cache. Intended to be used with the external page-cache. Requires a new 'cache_lock' table, and should be used with page-cache-memcache lock patch. [readme]

  • page-cache-memcache lock
    Adds support for page-cache lock stampede protection to memcache. Requires the page-cache lock patch. [readme]

  • path cache
    Greatly reduce the number of database queries on every page load caused by URL path aliases. [readme]

  • replication
    Modify Drupal core so it can be configured to send specified queries to a one or more replication slaves, helping to distribute the database load. [readme]

  • replication-slave
    Implements some basic uses of the replication patch that sends all temporary tables, pager queries and some node_load queries to the replication slaves. [readme]