MySql 调优工具 mysqltuner.pl

1,下载


wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl -o mysqltuner.pl


2,运行


perl mysqltuner.pl


3,结果


[OK] Currently running supported MySQL version 5.5.41-0ubuntu0.14.04.1
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM
[--] Data in MEMORY tables: 372K (Tables: 18)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[--] Data in InnoDB tables: 5M (Tables: 314)
[--] Data in MyISAM tables: 656K (Tables: 321)
[!!] Total fragmented tables: 314

-------- Security Recommendations  -------------------------------------------
[OK] All database users have passwords assigned

-------- Performance Metrics -------------------------------------------------
[--] Up for: 3h 47m 55s (34K q [2.522 qps], 552 conn, TX: 14M, RX: 7M)
[--] Reads / Writes: 52% / 48%
[--] Total buffers: 192.0M global + 2.7M per thread (151 max threads)
[OK] Maximum possible memory usage: 597.8M (15% of installed RAM)
[OK] Slow queries: 0% (0/34K)
[OK] Highest usage of available connections: 3% (5/151)
[OK] Key buffer size / total MyISAM indexes: 16.0M/1.2M
[OK] Key buffer hit rate: 99.9% (106K cached / 156 reads)
[OK] Query cache efficiency: 54.5% (9K cached / 17K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 596 sorts)
[!!] Joins performed without indexes: 144
[OK] Temporary tables created on disk: 21% (1K on disk / 5K total)
[OK] Thread cache hit rate: 99% (5 created / 552 connections)
[!!] Table cache hit rate: 15% (400 open / 2K opened)
[OK] Open file limit used: 31% (319/1K)
[OK] Table locks acquired immediately: 100% (19K immediate / 19K locks)
[OK] InnoDB buffer pool / data size: 128.0M/5.0M
[OK] InnoDB log waits: 0
-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
    Adjust your join queries to always utilize indexes
    Increase table_open_cache gradually to avoid file descriptor limits
    Read this before increasing table_open_cache over 64: http://bit.ly/1mi7c4C
Variables to adjust:
    join_buffer_size (> 128.0K, or always use indexes with joins)
    table_open_cache (> 400)


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值