当前位置:  数据库>mysql

mysql性能优化脚本mysqltuner.pl使用介绍

    来源: 互联网  发布时间:2014-10-08

    本文导语:  MySQLTuner 下载地址:http://github.com/rackerhacker/MySQLTuner-perl MySQLTuner 使用方法: Downloading and using MySQLTuner is actually a very simple process: wget mysqltuner.pl perl mysqltuner.pl If you'd rather not invoke perl every time, just make it executable: chmod u+x mysqltuner.p...

MySQLTuner 下载地址:http://github.com/rackerhacker/MySQLTuner-perl

MySQLTuner 使用方法:
Downloading and using MySQLTuner is actually a very simple process:

wget mysqltuner.pl
perl mysqltuner.pl

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

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

» 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

看看我的运行结果

代码如下:

>> MySQLTuner 1.1.1 - Major Hayden
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering

-------- 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)


    
 
 

您可能感兴趣的文章:

  • 紧急求救!!!!如何在shell脚本中,执行对mysql的操作
  • 如何后台运行mysql脚本?谢谢
  • 哪位有shell写的mysql备份脚本阿,想借鉴看下,谢谢
  • mysql下怎样运行脚本以运行niuzi.sql为例
  • 把mysql查询结果保存到文件的shell脚本
  • 使用Linux的Shell脚本定时处理MySQL超时
  • MySQL 脚本开发工具 MyQuery
  • Linux自动备份MySQL数据库脚本代码
  • 用sh脚本备份mysql的文件打不开
  • 利用Shell脚本实现远程MySQL自动查询
  • centos中mysql备份数据库脚本分享
  • shell脚本监控mysql主从状态
  • 用shell脚本在mysql表中批量插入数据的方法
  • 想写个shell脚本调用mysql的存储过程,怎么改都执行不了。。。
  • Python Mysql自动备份脚本
  • shell脚本中设置mysql记录分隔符为回车
  • PHP处理SQL脚本文件导入到MySQL的代码实例
  • 实现MySQL定时批量检查表repair和优化表optimize table的shell脚本
  • mysql自动化安装脚本(ubuntu and centos64)
  • linux下如何用C脚本连接访问MYSQL
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • MySQL 高性能存储引擎 TokuDB
  • 高性能KV型MySQL存储引擎 SeqDB
  • 打算用jboss+mysql+jbuilder来开发j2ee项目,请各位给点意见,特别是建模和性能方面的,来者有分!!!!!!
  • MySQL获取系统性能和状态代码
  • MySQL性能优化之Open_Table配置参数的合理配置建议
  • MySQL 删除大表的性能问题解决方案
  • MYSQL性能优化分享(分库分表)
  • Mysql自带profiling性能分析工具使用分享
  • 用PHP连mysql比oracle数据库性能好
  • 一个单引号引发的MYSQL性能问题分析
  • MySQL性能优化之table_cache配置参数浅析
  • 高性能MySQL读书笔记 找出谁持有锁
  • MySQL性能设置
  • mysql自动化安装脚本(ubuntu and centos64) iis7站长之家
  • 可以改善mysql性能的InnoDB配置参数
  • MySQL查询随机数据的4种方法和性能对比
  • mysql性能监控工具Innotop简介及配置
  • MySQL性能优化的一些技巧帮助你的数据库
  • MySQL性能优化 出题业务SQL优化
  • MySQL性能分析及explain的使用说明
  • mysql中如何查看最大连接数(max_connections)和修改最大连接数
  • 在 linux下输入"mysql"命令,进入mysql命令行,但出现“Can't connetc to local MySQL server thuough socket /var/lib/mysql/mysql.sock
  • Mysql查询错误:ERROR:no query specified原因
  • MySQL 重装MySQL后, mysql服务无法启动
  • php安装完成后如何添加mysql扩展
  • 为什么用linux安装盘安装了mysql后,启动mysql,提示找不到mysql.sock文件?
  • mysql中查询当前正在运行的SQL语句并找出mysql中运行慢的sql语句
  • 請教,在redhat linux7.2+mysql 中,系統提示mysql已啟動,網頁卻不能訪問mysql?
  • Myeclipse中自带Tomcat的JDBC连接池配置(mysql和mssql)
  • 求解释: useradd -g mysql mysql -d /home/mysql -s /sbin/nologin
  • MySQL Workbench的下载安装与使用教程


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3