MySQL性能建议者mysqltuner.pl和pt-variable-advisor
[root@etch171 ~]# mysqltuner.pl --host 10.XXX --port XXX --user xxx --pass xxx --forcemem >> MySQLTuner 1.2. - Major Hayden <major@mhtx.net>
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering
[--] Performing tests on 10.xxx:38xxx
[OK] Logged in using credentials passed on the command line
[--] Assuming MB of physical memory
[!!] Assuming MB of swap space (use --forceswap to specify) -------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.-log -------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 31M (Tables: )
[--] Data in InnoDB tables: 913G (Tables: )
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: )
[!!] Total fragmented tables: -------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned -------- Performance Metrics -------------------------------------------------
[--] Up for: 14d 1h 24m 13s (114M q [94.201 qps], 28M conn, TX: 441B, RX: 36B)
[--] Reads / Writes: % / %
[--] Total buffers: .1G global + 128.2M per thread ( max threads)
[!!] Maximum possible memory usage: .9G (% of installed RAM)
[OK] Slow queries: % (28K/114M)
[OK] Highest usage of available connections: % (/)
[OK] Key buffer size / total MyISAM indexes: 256.0M/10.6M
[OK] Key buffer hit rate: 100.0% (443K cached / reads)
[!!] Query cache efficiency: 8.3% (3M cached / 42M selects)
[!!] Query cache prunes per day:
[OK] Sorts requiring temporary tables: % ( temp sorts / 120K sorts)
[OK] Temporary tables created on disk: % ( on disk / 239K total)
[OK] Thread cache hit rate: % (2K created / 28M connections)
[OK] Table cache hit rate: % ( open / opened)
[OK] Open file limit used: % (/204K)
[OK] Table locks acquired immediately: % (43M immediate / 43M locks)
[!!] InnoDB data size / buffer pool: .8G/.0G -------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Reduce your overall MySQL memory footprint for system stability
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
query_cache_limit (> 2M, or use smaller result sets)
query_cache_size (> 124M)
innodb_buffer_pool_size (>= 913G)
本机
[root@typhoeus79 MySQLTuner-perl-master]# perl mysqltuner.pl --user root --pass c0BsZjR57MgAGOk6IWZAMarVVg0 --socket /data1/guosong/mysql_5580/tmp/mysql.sock >> MySQLTuner 1.2. - Major Hayden <major@mhtx.net>
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering
[OK] Logged in using credentials passed on the command line -------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.-log
[OK] Operating on -bit architecture -------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 116K (Tables: )
[--] Data in InnoDB tables: 1G (Tables: )
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: )
[!!] Total fragmented tables: -------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned -------- Performance Metrics -------------------------------------------------
[--] Up for: 56d 14h 18m 18s (20K q [0.004 qps], 1K conn, TX: 886M, RX: 294M)
[--] Reads / Writes: % / %
[--] Total buffers: 696.0M global + 34.2M per thread ( max threads)
[OK] Maximum possible memory usage: .0G (% of installed RAM)
[OK] Slow queries: % (/20K)
[OK] Highest usage of available connections: % (/)
[OK] Key buffer size / total MyISAM indexes: 32.0M/.0K
[OK] Key buffer hit rate: 99.5% (4K cached / reads)
[!!] Query cache efficiency: 1.4% ( cached / 2K selects)
[OK] Query cache prunes per day:
[OK] Sorts requiring temporary tables: % ( temp sorts / sorts)
[OK] Temporary tables created on disk: % ( on disk / total)
[OK] Thread cache hit rate: % ( created / 1K connections)
[OK] Table cache hit rate: % ( open / opened)
[OK] Open file limit used: % (/8K)
[OK] Table locks acquired immediately: % (4K immediate / 4K locks)
[!!] InnoDB data size / buffer pool: .3G/512.0M -------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Variables to adjust:
query_cache_limit (> 2M, or use smaller result sets)
innodb_buffer_pool_size (>= 1G)
pt-variable-advisor
•# WARN innodb_flush_log_at_trx_commit-: InnoDB is not configured in strictly ACID mode.
•# NOTE innodb_max_dirty_pages_pct: The innodb_max_dirty_pages_pct is lower than the default.
•# NOTE log_warnings-: Log_warnings must be set greater than to log unusual events such as
aborted connections.
•# NOTE max_connect_errors: max_connect_errors should probably be set as large as your
platform allows.
•# WARN sync_binlog: Binary logging is enabled, but sync_binlog isn't configured so that every transaction is flushed to the binary log for durability.
根据需求自动生成配置
MySQL性能建议者mysqltuner.pl和pt-variable-advisor的更多相关文章
- mysql性能优化工具mysqltuner使用
1.下载:wget --no-check-certificate https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysq ...
- 借助 MySQLTuner 优化 MySQL 性能(转载的一篇文章)
MySQLTuner 是一个 Perl 脚本,可以用来分析您的 MySQL 性能,并且基于收集到的信息给出相应的优化建议.这样子,您就可以调整 my.cnf 从而优化您的 MySQL 设置. 这边只是 ...
- mysql 性能优化 20 条建议
MySQL性能优化的最佳20+条经验 2009年11月27日陈皓发表评论阅读评论100,946 人阅读 今天,数据库的操作越来越成为整个应用的性能瓶颈了,这点对于Web应用尤其明显.关于数据库的性 ...
- mysql性能优化的一些建议
mysql性能优化的一些建议 1.EXPLAIN 你的 SELECT 查询 查看rows列可以让我们找到潜在的性能问题. 2.为关键字段添加索引,比如:where, order by, group b ...
- redmine在linux上的mysql性能优化方法与问题排查方案
iredmine的linux服务器mysql性能优化方法与问题排查方案 问题定位: 客户端工具: 1. 浏览器inspect-tool的network timing工具分析 2. 浏览 ...
- mysql性能监控工具:mycheckpoint的使用方法
mycheckpoint 是针对mysql的一个性能监控.指标采集的python写成的工具. 工作原理说明: mycheckpoint是一段脚本,通过将其设置为crontab定时任务,每几分钟采集一次 ...
- mysql性能优化(一)
随着项目的上线,关注开始关注服务器的运维和优化,其中后端数据库状态查看和参数调优是比不可少的一步,可能用到的两个小工具: mysqltuner.pl tuning-primer.sh 参考: [1] ...
- MySQL性能调优与架构设计——第 16 章 MySQL Cluster
第 16 章 MySQL Cluster 前言: MySQL Cluster 是一个基于 NDB Cluster 存储引擎的完整的分布式数据库系统.不仅仅具有高可用性,而且可以自动切分数据,冗余数据等 ...
- [原] KVM 环境下MySQL性能对比
KVM 环境下MySQL性能对比 标签(空格分隔): Cloud2.0 [TOC] 测试目的 对比MySQL在物理机和KVM环境下性能情况 压测标准 压测遵循单一变量原则,所有的对比都是只改变一个变量 ...
随机推荐
- Linq常见操作示例
static void DeferredQuery() { var names = new List<string> { "Nino", "Alberto&q ...
- BeginInvoke()使用
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.I ...
- [译]ASP.NET Core 2.0 中间件
问题 如何创建一个最简单的ASP.NET Core中间件? 答案 使用VS创建一个ASP.NET Core 2.0的空项目,注意Startup.cs中的Configure()方法: public vo ...
- 牛顿插值法及其C++实现
h1 { margin-bottom: 0.21cm } h1.western { font-family: "Liberation Sans", sans-serif; font ...
- ubuntu16.04, Matlab2016b caffe编译安装
在Ubuntu上编译安装caffe还是个比较蛋疼的事,有时候会莫名其妙的碰到很多库的问题,这篇文章就把我在Ubuntu上编译安装caffe的过程和遇到的问题大致记录一下. 1.安装opencv htt ...
- Pdf文件处理组件对比(Aspose.Pdf,Spire.Pdf,iText7)
目的 因为公司是做医疗相关软件的,所以经常和文档打交道,其中就包含了Pdf.医院的Pdf(通常是他们的报告)都千奇百怪,而我们一直以来都是在用一些免费且可能已经没人维护了的组件来处理Pdf,所以就经常 ...
- js math对象总结
1: Math 对象用于执行数学任务. 2:Math 对象并不像 Date 和 String 那样是对象的类,因此没有构造函数 Math(), Math.sin() 这样的函数只是函数 3:通过把 ...
- LeetCode 257. Binary Tree Paths (二叉树路径)
Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 ...
- sql语句如何查询一个表中某两个字段的相同数据?
Select Name,ID From A group by Name,ID having count (*)>1
- Hdu 1698(线段树 区间修改 区间查询)
In the game of DotA, Pudge's meat hook is actually the most horrible thing for most of the heroes. T ...