Использование mysqltuner.pl
Использование mysqltuner.pl
$ perl mysqltuner.pl
>> MySQLTuner 1.2.0 - Major Hayden
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering
Please enter your MySQL administrative login:
Please enter your MySQL administrative password:
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.21-55-log
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 4G (Tables: 339)
[--] Data in InnoDB tables: 3M (Tables: 10)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[--] Data in MEMORY tables: 1M (Tables: 1)
[!!] Total fragmented tables: 28
-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned
-------- Performance Metrics -------------------------------------------------
[--] Up for: 15d 1h 56m 50s (3B q [2K qps], 92M conn, TX: 1916B, RX: 311B)
[--] Reads / Writes: 82% / 18%
[--] Total buffers: 23.5G global + 16.1M per thread (500 max threads)
[!!] Maximum possible memory usage: 31.4G (99% of installed RAM)
[OK] Slow queries: 0% (3M/3B)
[OK] Highest usage of available connections: 85% (429/500)
[OK] Key buffer size / total MyISAM indexes: 512.0M/1.1G
[OK] Key buffer hit rate: 100.0% (87B cached / 10M reads)
[OK] Query cache efficiency: 90.8% (1B cached / 1B selects)
[!!] Query cache prunes per day: 1050986
[OK] Sorts requiring temporary tables: 0% (4K temp sorts / 33M sorts)
[!!] Joins performed without indexes: 44590
[OK] Temporary tables created on disk: 2% (973K on disk / 34M total)
[OK] Thread cache hit rate: 92% (6M created / 92M connections)
[!!] Table cache hit rate: 0% (400 open / 109K opened)
[OK] Open file limit used: 20% (512/2K)
[OK] Table locks acquired immediately: 98% (196M immediate / 199M locks)
[OK] InnoDB data size / buffer pool: 3.7M/20.0G
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Reduce your overall MySQL memory footprint for system stability
Increasing the query_cache size over 128M may reduce performance
Adjust your join queries to always utilize indexes
Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
query_cache_size (> 2G) [see warning above]
join_buffer_size (> 2.0M, or always use indexes with joins)
table_cache (> 400)
$
mysqltuner, mysql |