I am curious to know if anyone has advice on tweaking the out-of-the-box my.cnf specifically for Drupal?
The organization I work for typically hosts multisite installations, and may have numerous disparate sites running on a single web server using a single MySQL server... Given that there is a wide range of sites with varying purposes (some more anonymous viewing, some more authenticated content generation), are there any Drupal-specific changes to my.cnf which might be appropriate?
It seems to me that the table_cache value should be increased to a value which reflects both the number of tables as well as the amount of RAM.
The Query Cache is likely more useful on a predominantly anonymous-viewed site than on a site with a lot of authenticated user content generation. (http://groups.drupal.org/node/286233#comment-897508)
Chapter 8 of O'Rielly's High Performance MySQL suggests:
So what should you do? Make sure the basics such as the InnoDB buffer pool and log file size are appropriate, set a few safety and sanity options if you wish to prevent bad behavior (but note that these usually won’t improve performance—they’ll only avoid problems), and then leave the rest of the settings alone.
Does the question of Drupal-optimizations for MySQL make sense?
I have also raised this question in the High Performance group:
http://groups.drupal.org/node/286233#comment-897648
Comments
Dealing with table_cache size
http://drupal.org/node/85768
table_cache = 1024
http://drupal.org/node/259580
table_cache = 4096
http://groups.drupal.org/node/13844
Couple of options between 1000 & 2000 are provided for table_cache
http://highervisibilitywebsites.com/blog/mysql-tuning-tools-tips-and-lin...
table_cache = 1024
http://www.ebizontek.com/improving-mysql-performance-high-traffic-drupal...
table_cache=2048
And there are concerns of increasing this value too high:
http://dba.stackexchange.com/questions/5232/mysql-table-cache-and-opened...
http://dev.mysql.com/doc/refman/5.0/en/table-cache.html
The default value for table_cache is 64
I've started a wiki here with a my.conf - http://groups.drupal.org/node/289613
--
OpenConcept | Twitter @mgifford | Drupal Security Guide
InnoDB Changes
This is interesting:
https://drupal.org/node/85768#comment-7213126