[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.

http://www.percona.com/pdf-canonical-header?path=files/presentations/percona-live/dc-2012/PLDC2012-optimizing-mysql-configuration.pdf

根据需求自动生成配置

MySQL性能建议者mysqltuner.pl和pt-variable-advisor的更多相关文章

  1. mysql性能优化工具mysqltuner使用

    1.下载:wget --no-check-certificate https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysq ...

  2. 借助 MySQLTuner 优化 MySQL 性能(转载的一篇文章)

    MySQLTuner 是一个 Perl 脚本,可以用来分析您的 MySQL 性能,并且基于收集到的信息给出相应的优化建议.这样子,您就可以调整 my.cnf 从而优化您的 MySQL 设置. 这边只是 ...

  3. mysql 性能优化 20 条建议

    MySQL性能优化的最佳20+条经验 2009年11月27日陈皓发表评论阅读评论100,946 人阅读   今天,数据库的操作越来越成为整个应用的性能瓶颈了,这点对于Web应用尤其明显.关于数据库的性 ...

  4. mysql性能优化的一些建议

    mysql性能优化的一些建议 1.EXPLAIN 你的 SELECT 查询 查看rows列可以让我们找到潜在的性能问题. 2.为关键字段添加索引,比如:where, order by, group b ...

  5. redmine在linux上的mysql性能优化方法与问题排查方案

    iredmine的linux服务器mysql性能优化方法与问题排查方案     问题定位:   客户端工具: 1. 浏览器inspect-tool的network timing工具分析   2. 浏览 ...

  6. mysql性能监控工具:mycheckpoint的使用方法

    mycheckpoint 是针对mysql的一个性能监控.指标采集的python写成的工具. 工作原理说明: mycheckpoint是一段脚本,通过将其设置为crontab定时任务,每几分钟采集一次 ...

  7. mysql性能优化(一)

    随着项目的上线,关注开始关注服务器的运维和优化,其中后端数据库状态查看和参数调优是比不可少的一步,可能用到的两个小工具: mysqltuner.pl tuning-primer.sh 参考: [1] ...

  8. MySQL性能调优与架构设计——第 16 章 MySQL Cluster

    第 16 章 MySQL Cluster 前言: MySQL Cluster 是一个基于 NDB Cluster 存储引擎的完整的分布式数据库系统.不仅仅具有高可用性,而且可以自动切分数据,冗余数据等 ...

  9. [原] KVM 环境下MySQL性能对比

    KVM 环境下MySQL性能对比 标签(空格分隔): Cloud2.0 [TOC] 测试目的 对比MySQL在物理机和KVM环境下性能情况 压测标准 压测遵循单一变量原则,所有的对比都是只改变一个变量 ...

随机推荐

  1. zoj1871steps 数学 水

                                                                                            zoj1871 题目大意 ...

  2. 我的three.js学习记录(二)

    通过上一篇文章我的three.js学习记录(一)基本上是入门了three.js,但是这不够3D,这次我希望能把之前做的demo弄出来,然后通过例子来分析操作步骤. 1. 示例 上图是之前做的一个dem ...

  3. 使用下一代web开发框架koa2搭建自己的轻服务器

    Koa 是由 Express 原班人马亲情打造的新一代web框架.既然已经有 Express 了,为什么又要搞一个Koa出来呢?因为 Koa 相比 Express 体积更小,代码更健壮,作用更纯粹. ...

  4. Django实现简单分页功能

    使用django的第三方模块django-pure-pagination 安装模块: pip install django-pure-pagination 将'pure_pagination'添加到s ...

  5. 超级简单的retrofit使用自签名证书进行HTTPS请求的教程

    1. 前言 HTTPS越来越成为主流,谷歌从 2017 年起,Chrome 浏览器将也会把采用 HTTP 协议的网站标记为「不安全」网站:苹果从 2017 年 iOS App 将强制使用 HTTPS: ...

  6. 有关Datatabled的合并,排序和删除重复行的方法

    当某些操作需要涉及合并Datatable时,我们应该如何操作呢? 下面是自己总结的一些方法: 当有两表dt1和dt2的时候,使用dt1.Merge(dt2) 可以将表1表2中相同的合并在一起 排序方法 ...

  7. 深入理解Java虚拟机--中

    深入理解Java虚拟机--中 第6章 类文件结构 6.2 无关性的基石 无关性的基石:有许多可以运行在各种不同平台上的虚拟机,这些虚拟机都可以载入和执行同一种平台无关的字节码(ByteCode),从而 ...

  8. hibernate和mybatis区别

    看图    Hibernate mybatis 难易度 难 简单,容易上手 编码 良好的映射机制,不需要关心 需要手动编写sql,resultMap 调优 制定合理的缓存策略: 尽量使用延迟加载特性: ...

  9. PHP二分查找算法

    思路:递归算法.在一个已经排好序的数组中查找某一个数值,每一次都先跟数组的中间元素进行比较,若相等则返回中间元素的位置,若小于中间元素,则在数组中小于中间元素的部分查找,若大于中间元素,则在数组中大于 ...

  10. js代码执行顺序问题

      前  言 LiuDaP 今天就给大家介绍一个特别基础的东西,javascript中函数的一点儿小知识(js代码的执行顺序),希望对大家有那么一点点帮助吧!!! 一.js--->单线程 严格意 ...