III. Drupal Server and Database Configuration

Configure Alternate PHP Cache (APC) for Drupal

APC is an op-code caching sytem for Apache servers. The more Drupal modules you enable, the greater the need for such PHP pre-processing. Most PHP accelerators work by caching the compiled bytecode of PHP scripts to avoid the overhead of parsing and compiling source code on each request (some or all of which may never even be executed). To further improve performance, the cached code is stored in shared memory and directly executed from there, minimizing the amount of slow disk reads and memory copying at runtime.

Enable Apache mod_deflate

Apache's mod_deflate module compresses static HTML files before sending them to the end-user. You must enable it on your server.

Example .htaccess snippet

 
  AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript 

Enable MySQL Query Caching

Add another caching layer to your system: make sure to properly cache MySQL queries. This relies on settings you find (or should insert) in your my.cnf configuration file on your server. According to Nadeau software, the MySQL query caching can boost performance by 5-15%. It is important to regularly monitor your MySQL caching performance to see if the allocated RAM for caching is still appropriate.

From Nadeau Software:

Handle Users and Their Sessions via Memcached

For busy sites the sessions table will be read very frequently and can cause performance locking problems. This is not an issue for small and medium sites. But to take Drupal performance a step further, let APC or Memcache handle the sessions. I prefer and recommend using the Drupal Memcached module, which has a built-in feature to handle sessions via Memcache. I usually create a special user bin for Memcached (recommended).

Install ImageMagick to Replace PHP's GD Image Library

ImageMagick is an image processing tool for PHP, and Drupal's Image toolkit can use it. ImageMagick is more resource-efficient than PHP's often built-in GD libraries. ImageMagick is also a solution to those who have PHP not compiled with the correct GD libraries.

Drupal can work with ImageMagick in several way, i.e. the Image module and the Im_raw action module for ImageCache.

Turn Apache KeepAlive On

From Ebizontek:

If you are not using any caching server for files, KeepAlive On helps in delivering all the static files in a single connection. Find your httpd.conf and make KeepAlive On. If you have a static files serving mechanism (like having squid or serving static files through high throughput server like lighttpd), KeepAlive off usually is a positive turn on the performance.

Morningtime