Skip to content Skip to navigation

Drupal Performance - Server Optimization

Posted by: 
Topics: 
The following are my notes from a (live) meeting with a Drupal consultant, and are only listed here to provide clues to get started. I am a lousy transcriptionist, and there is no warrantee on any of it, but I figured folks might get some leads:

cache how php is processed by Apache

  • fcgi , "opcode compiler" (?) like APC, or other optimization scheme
  • mod_fcgid
  • pre-compile certain common functions -- modules?
  • mod_rewrite --> send it to somewhere else instead of index.php

Memcache

  • reduced PHP overhead
  • better for logged in users than MySQL cache
  • problems using memcache for session data
  • Drupal 5 needs patch to work with InnoDB (no locks patch)
    • need to reapply patch after security updates
    • process:
      • change tables (except search index) to InnoDB
      • update Drupal to latest 5.x.
      • apply the "no locks patch"

Drupal 5 needs patch to work with Memcache

Drupal modules

cache router Drupal module: http://drupal.org/project/cacherouter

advanced cache module: http://drupal.org/project/advcache

  • requires many patches, not necessarily recommended
  • caches node objects
  • works together with memcache

slow query log -- built into MySQL + some Perl script

tweak PHP settings in php.ini (increase memory, e.g.)

Views can be rolled into a module

  • if complex queries joins tons of tables, it is possible to create a custom table: a table that contains the keys to other tables
  • faster, but of course harder to change, bcs no Views UI ...

Use devel module for benchmarking

-- need ITS/Drupallers collab to make this happen
  • page execution timer
  • memory usage meter
  • query log

J-Meter -- java benchmarking app

  • similar to Apache bench
  • complex scripting system
  • look for a J-Meter module in the coming months

Misc

"top" command = unix command for measuring load (%man top)

reverse proxy caching ("squid" "varnish" ?)