MySQL Tools: MySQLTuner

I just stumbled across this interesting mysql tuning script called MySQLTuner. Don’t see this (or any other similar script) as the magical tool that will optimize your mysel server… There is no such thing, because there are so many different applications and each will require its specific database tunings.
Still, mysqltuner can be very useful tool in many cases, like for ex:

wget http://mysqltuner.com/mysqltuner.pl
perl mysqltuner.pl

The output for a server that has most of the parameters on default might look like:

# ./mysqltuner.pl
MySQL High-Performance Tuner - Major Hayden
Bug reports, feature requests, and downloads at mysqltuner.com
Run with ‘–help’ for additional options and output filtering
[OK] Currently running supported MySQL version 5.0.44-log
——– General Statistics ————————————————–
[–] Up for: 15s (15 q [1.000 qps], 8 conn, TX: 20K, RX: 894)
[OK] Maximum possible memory usage: 318.7M (63% of installed RAM)
[OK] Slow queries: 0%
[OK] Highest usage of available connections: 2%
[!!] Key buffer size / total MyISAM indexes: 8.0M/64.8M
[!!] Query cache is disabled
[OK] Temporary tables created on disk: 19%
[!!] Thread cache hit rate: 12%
[OK] Table cache hit rate: 80%
[OK] Open file limit used: 4%
[OK] Table locks acquired immediately: 100%
——– Recommendations —————————————————–
General recommendations:
MySQL started within last 24 hours - recommendations may be inaccurate
Variables to increase:
key_buffer_size (> 64.8M)
query_cache_size (>= 8M)
Variables to decrease:
long_query_time (<= 5)
max_seeks_for_key (<= 100)

From its documentation:

Check it out as it is definitely an interesting script that will give you a quick look at the configuration of your mysql server and start your journey to optimize your mysql server.

Tags: , , ,

Share This

Related Posts:

Leave a Reply