You are here

MySQL tuning

This is my experience tuning a MySQL server running on Rimuhosting for Drupal.
First I installed a tuning script in /root
chmod 700
yum install bc
cp /etc/my.cnf /etc/my.cnf.$(date +"%Y-%m-%d")

Now add the following values under [mysqld]:
table_cache = 512
query_cache_size = 32M
query_cache_type = 1
max_heap_table_size = 32M
tmp_table_size = 64M
max_connections = 250

Here is some info:
and some more:

Apache tuning:
rimu advise: increase the MaxClients settings (typically by about 1 extra max client per 10MB added)
first: cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.$(date +"%Y-%m-%d")

Apc tuning
cp /etc/php.d/apc.ini /etc/php.d/apc.ini.$(date +"%Y-%m-%d")
-apc.shm_size = "72" #increase size from 36 to 72
-set apc.stat = 0 #lock code in cache and stop checking for changes

Here is an article: 10 essential MySQL tools for admins