Mysqltuner Download Address: Http://github.com/rackerhacker/MySQLTuner-perl
Mysqltuner Use Method:
Downloading and using Mysqltuner is actually a very simple process:
wget mysqltuner.pl
Perl mysqltuner.pl
If you ' d rather not invoke the Perl every time, just make it executable:
chmod u+x mysqltuner.pl
./mysqltuner.pl
»latest Development Version
If you are want to get the bleeding edge commits, you can check out the latest code with GIT:
git clone git://github.com/rackerhacker/mysqltuner-perl.git
Look at my running results.
Copy Code code as follows:
>> Mysqltuner 1.1.1-major Hayden
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help ' for additional options and output filtering
--------General Statistics--------------------------------------------------
[--] Skipped version check for Mysqltuner script
[OK] Currently running supported MySQL version 5.1.43-log
[OK] Operating on 64-bit architecture
--------Storage Engine Statistics-------------------------------------------
[--] Status:-archive-bdb-federated-innodb-isam-ndbcluster
[--] Data in MyISAM tables:889m (tables:479)
[--] Data in MEMORY tables:1m (tables:4)
[!!] Total Fragmented tables:29
--------Security Recommendations-------------------------------------------
[OK] All database users have passwords assigned
--------Performance Metrics-------------------------------------------------
[--] Up for:12h 55m 27s (4M Q [105.230 QPS], 295K conn, tx:9b, rx:546m)
[--] reads/writes:82%/18%
[--] Total buffers:432.0m global + 6.3M per thread (max threads)
[!!] Maximum Possible memory usage:3.5g (175% of installed RAM)
[OK] Slow queries:0% (48k/4m)
[OK] Highest usage of available connections:3% (16/500)
[OK] Key Buffer size/total MyISAM indexes:384.0m/332.6m
[OK] Key buffer hit rate:100.0% (2B cached/205k reads)
[OK] Query Cache efficiency:49.3% (1M cached/3m selects)
[!!] Query Cache prunes per day:268042
[OK] Sorts requiring temporary tables:0% (+ temp sorts/122k sorts)
[OK] Temporary tables created on disk:19% (4K to disk/22k total)
[OK] Thread Cache Hit rate:99% (created/295k connections)
[!!] Table Cache Hit rate:18% (256 open/1k opened)
[OK] Open file Limit used:19% (497/2k)
[!!] Table Locks acquired immediately:88%
--------Recommendations-----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within hours-recommendations may inaccurate
Reduce your overall MySQL memory footprint for system stability
Increase Table_cache gradually to avoid file descriptor limits
Optimize queries and/or use InnoDB to reduce lock wait
Variables to adjust:
MySQL ' s maximum memory usage is dangerously high * * * *
Add RAM before increasing MySQL buffer variables * * *
Query_cache_size (> 32M)
Table_cache (> 256)