用mysqltuner-perl来得到的报告,第一次用,不知道如何看,大家给点建议吧!
下面的是我用mysqltuner-perl来得到的报告,第一次用,不知道如何看,大家给点建议吧![root@mysql tmp]# ll
total 76
-rw-r--r-- 1 root root 40593 Sep 17  2009 mysqltuner.pl
-rw-r--r-- 1 root root 25344 Feb 28 17:34 rackerhacker-MySQLTuner-perl-v1.1.1-0-gb2dfc87.zip
-rwxrwxrwx 1 root root   102 Feb 28 17:37 tmp.tmp.tt
-rwxrwxrwx 1 root root    24 Feb 28 17:37 tmp.tmp.username
[root@mysql tmp]# chmod u+x mysqltuner.pl
[root@mysql tmp]# ./mysqltuner.pl

>>  MySQLTuner 1.1.1 - Major Hayden <[email protected]>
>>  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: root
Please enter your MySQL administrative password:
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.41-log
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 18G (Tables: 380)
[--] Data in InnoDB tables: 144K (Tables: 9)
[!!] Total fragmented tables: 53
-------- Security Recommendations  -------------------------------------------
[OK] All database users have passwords assigned
-------- Performance Metrics -------------------------------------------------
[--] Up for: 3d 6h 50m 47s (2M q [9.464 qps], 270K conn, TX: 11B, RX: 314M)
[--] Reads / Writes: 87% / 13%
[--] Total buffers: 2.9G global + 10.4M per thread (151 max threads)
[!!] Maximum possible memory usage: 4.4G (115% of installed RAM)
[OK] Slow queries: 0% (52/2M)
[OK] Highest usage of available connections: 49% (74/151)
[OK] Key buffer size / total MyISAM indexes: 2.0G/5.8G
[OK] Key buffer hit rate: 99.7% (148M cached / 500K reads)
[!!] Query cache efficiency: 7.8% (747K cached / 9M selects)
[!!] Query cache prunes per day: 8216
[OK] Sorts requiring temporary tables: 0% (2 temp sorts / 12K sorts)
[!!] Joins performed without indexes: 1098
[OK] Temporary tables created on disk: 4% (637 on disk / 13K total)
[OK] Thread cache hit rate: 87% (34K created / 270K connections)
[!!] Table cache hit rate: 12% (497 open / 3K opened)
[OK] Open file limit used: 67% (801/1K)
[OK] Table locks acquired immediately: 99% (1M immediate / 1M locks)
[OK] InnoDB data size / buffer pool: 144.0K/384.0M
-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    Reduce your overall MySQL memory footprint for system stability
    Enable the slow query log to troubleshoot bad queries
    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_limit (> 1M, or use smaller result sets)
    query_cache_size (> 512M) [see warning above]
    join_buffer_size (> 128.0K, or always use indexes with joins)
    table_cache (> 512)
[root@mysql tmp]#

解决方案 »

  1.   

    General recommendations:
      Run OPTIMIZE TABLE to defragment tables for better performance
      Reduce your overall MySQL memory footprint for system stability
      Enable the slow query log to troubleshoot bad queries
      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_limit (> 1M, or use smaller result sets)
      query_cache_size (> 512M) [see warning above]
      join_buffer_size (> 128.0K, or always use indexes with joins)
      table_cache (> 512)这些就是啦,你自己用翻译软件查一下啦。