[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. jQuery Mobile 所有class选项,开发全解+完美注释

    全栈工程师开发手册 (作者:栾鹏) jQuery Mobile事件全解 jQuery Mobile 所有class选项 jQuery Mobile 所有data-*选项 jQuery Mobile 所 ...

  2. C++的socket编程学习

    前言 不得不承认作为一个前端开发,仍有一个后台开发的梦.从socket通信开始学习,在工作之余补充学习点相关知识,记录下学习的过程. 服务端 服务器代码如下,在设置listen之后,通过accept获 ...

  3. python爬虫爬取代理IP

    # #author:wuhao # #--*------------*-- #-****#爬取代理IP并保存到Excel----#爬取当日的代理IP并保存到Excel,目标网站xicidaili.co ...

  4. Linux命令-基本命令(1)

    1. ll dfdfdfd 2. vi dfffd

  5. 虚拟机VMware Workstation Pro下安装ubuntu-14.04.4(64位)方法(附ubuntu-14.04-desktop-amd64.iso下载链接)

    ubuntu-14.04-desktop-amd64.iso下载: 链接:http://pan.baidu.com/s/1bFi0d4 密码:yx0l 零基础linux使用入门教学视频分享: 链接:h ...

  6. (10.23)Java小知识!

    ---恢复内容开始--- 方法的定义: 一般情况下,定义一个方法包含以下语法: 修饰符 返回值类型 方法名 (参数类型 参数名 , ...){ ... 方法体 ... return 返回值; } 修饰 ...

  7. CSS学习总结

    CSS基础 简介 什么是CSS? CSS如何创建? 选择器 通用选择器 标签选择器 类选择器 ID选择器 属性选择器 后代选择器 子选择器 相邻元素选择器 伪类选择器 CSS样式 背景 文本 字体 链 ...

  8. 想要写出高性能sql语句,你得记住这些……

    1.在from子句中包含多个表名时,必须选择记录条数最少的表作为基础表:若有三个以上的表连接查询,那就需要选择交叉表作为基础表,交叉表指被其他表引用的表. 2.使用exists代替in.使用not e ...

  9. java 上传文件-生成文件首页缩略图 生成pdf 抓取图片

    方法:1.文件转换成pdf(采用openoffice或者jacob)   2.抓取pdf首页图 第一步:采用jacob: a.下载jacob  注意区分32位,64位,否则不能用 将dll文件放在ja ...

  10. LeetCode 531. Longly Pixel I (孤独的像素之一) $

    Given a picture consisting of black and white pixels, find the number of black lonely pixels. The pi ...