Posted by gauravkumar87 on February 9, 2009 at 2:24pm
Hey,
I've recently been put up against the huge task of scaling a large drupal site, tuning servers and the database.
Lets use this space to discuss performance issues that anyone has come up with and solutions you've found for this.
Starters for discussions:
- PHP Accelerators : Which one to use and when?
- Caching Techniques : Drupal Cache, Squid, Memcache
- Database Optimization : MySql variables, InnoDB vs. MyISAM
- Apache Tuning
What else?

Comments
Cross post
It'll be worthwhile to cross post this to - http://groups.drupal.org/high-performance
There are lot of articles about performance on http://2bits.com
I've personally used APC and Xcache, Had some problems with Xcache, APC seems to work fine. Got my page execution time down from 7000ms to 500 ms, In one of the projects.
drupal objects or even mysql results can be cached in memcache, there is even a API - http://drupal.org/project/memcache. Have not really tried it.
There is no standard my.cnf, so to say. Its more or like hit and trial. my.cnf would really depend on what people do on your site, As for innoDb and MyISAM, u would need innoDB for something like twitter but a static site can very well do with MyISAM.
Dipen Chaudhary
http://dipenchaudhary.com
http://playdrupal.com
Dipen Chaudhary
Founder, QED42 http://www.qed42.com Drupal development
Proxy Cache
hi dipen,
i believe using some php cache is very necessary, with a little more than average number of modules, one needs to keep the compiled php code in cache. Depends on one's choice, going by one of the 2bits articles, http://2bits.com/articles/benchmarking-apc-vs-eaccelerator-using-drupal...., i find eaccelerator better than APC (but here i assume that the benchmarking is right :) havent done the same benchmarking on my own).
Also, memcache seems to be unavoidable for high traffic websites (btw, it caches mysql objects, so even if you have query caching on, you always need to create another object).
DB configuration depends on your website, and yes there does not seem to be a standard configuration.
The only issue i have is with proxy caching. If I use something like squid, to serve many of my pages via a proxy cache, i need my drupal installation to talk to my squid cache and tell what not to cache. Ideally, i would want my drupal installation to purge the cache entry in squid whenever there is an update in a node or something like that. Rest of the content which have not been changed for long should also be served from cache. Now, from where I see this is something my default drupal installation should provide (coz i guess the change needs to be made in the core). What do you think?
Mukesh Agarwal
www.ilovebolly.com
Cheers,
Mukesh Agarwal
www.innoraft.com
Drupal Profiling and finding bottleneck
I have been facing such issues. I had spent many hours in profiling and finding which module is causing problem. Unless you find the bottleneck you cannot fix it. I has explained it in a post. http://www.mindyourcode.com/php/drupal-profiling-performance-analysis-fo...