【昊鼎王五】:一款好用的MYSQL性能优化工具,亲测可用

【昊鼎王五】:一款好用的MYSQL性能优化工具,亲测可用

一款好用的MYSQL性能优化工具,亲测可用:mysqltuner.pl
使用介绍:
MySQLTuner 下载地址:http://github.com/rackerhacker/MySQLTuner-perl

MySQLTuner 使用方法:
一.下载该工具:
1.方式一

Downloading and using MySQLTuner is actually a very simple process:

wget mysqltuner.pl

2.方式二

» Latest development version
If you 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

二.运行该工具:
1.方式一

perl mysqltuner.pl

如果报错的话,可能是服务器里面缺失perl 的插件,需要执行如下命令:

yum install -y perl*
或者
yum install ‘perl(Data::Dumper)‘

2.方式二

If you'd rather not invoke perl every time, just make it executable:

chmod u+x mysqltuner.pl
./mysqltuner.pl

三.看看我的运行结果




-------- 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 (500 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% (10 temp sorts / 122K sorts)
[OK] Temporary tables created on disk: 19% (4K on disk / 22K total)
[OK] Thread cache hit rate: 99% (16 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 last 24 hours - recommendations may be 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)

好了,聪明如你,就讲到这里吧,有问题的话可以留言。
在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值