Information for: DEVELOPERS   PARTNERS

Using Memcached

About Memcached

Memcached is a general-purpose memory cache server daemon. It can improve Drupal application performance by moving Drupal’s standard caches out of the database and by caching the results of other expensive database operations.

The most common use of Memcached with Drupal is storing Drupal’s cache tables in Memcached instead of in the application database. Storing Drupal’s cache tables in Memcached reduces the load on the database with every page load.

Using Memcached may not make any noticeable difference to an application already performing well at every layer in the server stack. Memcached is most helpful to applications needing to reduce the load on their database servers.

Installation instructions

For installation instructions, see Enabling Memcached on Acquia Cloud.

To learn more about how Memcached can benefit your website, see information about the architecture of Memcached, and how Drupal and the memcache module work together. To improve Memcached performance on your website, you can tune your Memcached settings for optimal performance, and enable stampede protection by moving locks into memory.

You can also install the PECL memcache extension to provide an API to communicate with the Memcached service.

Memcached versus memcache

Memcached is the name of the server-side daemon; memcache is the name of the PHP extension adding the libraries to create the PHP functions for communication with the daemon; memcached is a PHP library which facilitates communication with the daemon. Acquia Cloud runs the memcache libraries. The PHP memcache project at Drupal.org uses the memcache libraries.

For more information about how to communicate with the Memcached daemon using PHP, see the Memcache reference at php.net.

Memcached availability

Acquia Cloud supports Memcached for subscriptions and products based on the following table:

Product name Description
Acquia Cloud Professional You can enable and manage Memcached for your applications.
Acquia Cloud Enterprise Acquia will configure your servers with an appropriate amount of memory for Memcached. As an option, you can buy a dedicated Memcached server.
Acquia Cloud Site Factory To use Memcached with your websites, contact your Technical Account Manager (TAM) or Account Manager to review your hardware before implementing a post-settings.php hook.
Acquia Cloud Free Memcached is not supported. Learn more about Acquia Cloud Free and how to upgrade your subscription.
Acquia Cloud CD Acquia Cloud CD environments meeting certain requirements can use Memcached.
Acquia Cloud pipelines feature Memcached is supported for YAML files using version key 1.3.0 or greater.

Acquia Cloud CD prerequisites for using Memcached

Acquia Cloud CD subscribers can use Memcached and install it on a per-website basis, and can secure Memcached using SASL credentials. If you need Memcached support for your CD environment, the environment must meet the following prerequisites:

  • The environment uses the PECL memcached extension.
  • The environment must include the Memcache API and Integration module. If you are using Drupal 7, ensure you use version 7.x-1.6 or greater.

After meeting the preceding requirements, CD applications can use the 64 MB of allocated memcache.