Drupal Performance Tuning
2.8 million hits per day by Khalid Baheyeldin from 2bits.com
Took a site from .4 million hits, 96,000 hits per week. 65K users 15K Nodes. Site was locking up every few days
How did we do it?
We did not use any of the modules.
Problems
excessive swaping
Many services running that not needed like FTP
No PHP accelerator, no memcache
Lots of bloat in extra Apache modules, took off Java, Ruby etc.
Locking at the database because they were using MyISAM
Performance Assessment
New fresh server without all the parts they did not need
Turned off statistics in Drupal
Was on running on a 4 core
Now on 8 way server dell 2950 with 4 300 GB 15000 RPM disks
One Disk for OS
One Disk for Logs
One Disk for Drupal
One Disk for MySQL
Used the server Distro not the Desktop version, no X-windows Ubuntu 8.04
Apache
MPM Worker (threaded server)
Apache Fcgid (less database connections)
PHP
Fast CGI
APC
Simplicity vs Complexity
Fewer Modules is better
On Ubuntu you must use session_expire module to clean up sessions
memcache_admin module is helpful.
Block_cache enabled
The one thing that helped the site was Memcache (for annomous users) with 15 minutes
PHP Input Format Disables cache
The input format of PHP disables all cacheing so we created a new Input format called RAW that would leave "returns" in place
Fast_page_cache is built into Drupal but does not work with Forms
Patching
Is bad, but we kept it to a minimum, used for URL alias
Crawlers
Microsoft URL Control
LucidMedia
modified settings.php to return 418 error code "I'm a little tea pot short and..."
MySQL
innodb-file-per-table
innodb_buffer_pool_size
Leave most tables as MyISAM, but convert tables that lock to innodb (session)
script to check for sloq sql (Maat-kit-skit)
Munin to monitor CPU, Memory
Queue mail module
Allows you to convert all mailings to the job queue