This is really useful script called tuning-primer.sh by Matt Montgomery.
It is a shell script that evaluates the following parameters in MySQL:
- slow query count
- long_query_time
- query_cache_size
- % query cache actually used
- max_connections
- thread_cache
- key_buffer_size
- ratio of sort_merge operations to sorts (sort_buffer_size)
- number of full joins
- ratio of disk tmp tables vrs in memory tmp tables (tmp_table_size)
- table_cache
- ratio of table locks immediate to table locks waited
- ratio of table scans (read_buffer_size)
To use the script add your user name and password to a [client] group in your ~/.my.cnf file




This is a real simple way for Sys Admins or Devs to quickly find and adjust MySQL parameters in relation to performance.
I’ve included an example of the output here: http://blog.teambrad.net/2010/07/28/example-output-of-tuning-primer-sh/ but it’s even simpler to try on your server now.