Optimizing a drupal site in a hurry

2008-01-08 One-minute read

To help boost performance on the http://wsf2008.net site Ben asked me to research APC and memcache. Here are my initial notes.

First - the relevant web sites:

Memcache home page: http://www.danga.com/memcached/ Memcache drupal module: http://drupal.org/project/memcache Memcache php manual http://us2.php.net/memcache

APC home page: http://pecl.php.net/package/APC APC drupal module: http://drupal.org/project/apc APC php manual: http://us2.php.net/apc

Both packages are designed to speed up programs by providing a faster cache for storing and retrieving data (faster than say, storing it in a database or in a php file-based session, etc.).

Memcache is a generic cache - there are api’s written for perl, python, php, etc. It’s available in debian as php5-memcache. APC, on the other hand, is specifically designed for PHP and is distributed via pecl/pear (pecl install apc).

From a drupal perspective - both modules seem to focus on replacing the caching function - which by default write to the database. Therefore - this is a good solution if the database is your bottleneck.