MySQL性能建议者:mysqltuner.pl
来源:互联网 发布:注册域名要钱吗 编辑:程序博客网 时间:2024/05/29 10:36
[root@even ~]# wget http://mysqltuner.pl/mysqltuner.pl
[root@even ~]# chmod +x mysqltuner.pl
[root@even ~]# cp mysqltuner.pl /home/mysql/
一些简单的命令可从 --help 查阅
[mysql@even ~]$ ./mysqltuner.pl
>> MySQLTuner 1.2.0 - Major Hayden <major@mhtx.net>
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering
Please enter your MySQL administrative login: root
Please enter your MySQL administrative password:
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.16-log
[OK] Operating on 32-bit architecture with less than 2GB RAM
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 7B (Tables: 2)
[--] Data in InnoDB tables: 184M (Tables: 7)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[!!] Total fragmented tables: 5
-------- Security Recommendations -------------------------------------------
[!!] User '@even.example.com' has no password set.
[!!] User '@localhost' has no password set.
[!!] User 'root@127.0.0.1' has no password set.
[!!] User 'root@::1' has no password set.
[!!] User 'root@even.example.com' has no password set.
-------- Performance Metrics -------------------------------------------------
[--] Up for: 10s (9 q [0.900 qps], 6 conn, TX: 10K, RX: 625)
[--] Reads / Writes: 100% / 0%
[--] Total buffers: 176.0M global + 1.6M per thread (151 max threads)
[OK] Maximum possible memory usage: 411.9M (38% of installed RAM)
[OK] Slow queries: 0% (0/9)
[OK] Highest usage of available connections: 0% (1/151)
[OK] Key buffer size / total MyISAM indexes: 16.0M/98.0K
[!!] Query cache is disabled
[OK] Temporary tables created on disk: 0% (0 on disk / 2 total)
[!!] Thread cache is disabled
[OK] Table cache hit rate: 78% (26 open / 33 opened)
[OK] Open file limit used: 2% (21/1K)
[OK] Table locks acquired immediately: 100% (36 immediate / 36 locks)
[!!] Connections aborted: 16%
[!!] InnoDB data size / buffer pool: 184.8M/128.0M
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Set thread_cache_size to 4 as a starting value
Your applications are not closing MySQL connections properly
Variables to adjust:
query_cache_size (>= 8M)
thread_cache_size (start at 4)
innodb_buffer_pool_size (>= 184M)
[root@even ~]# chmod +x mysqltuner.pl
[root@even ~]# cp mysqltuner.pl /home/mysql/
一些简单的命令可从 --help 查阅
[mysql@even ~]$ ./mysqltuner.pl
>> MySQLTuner 1.2.0 - Major Hayden <major@mhtx.net>
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering
Please enter your MySQL administrative login: root
Please enter your MySQL administrative password:
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.16-log
[OK] Operating on 32-bit architecture with less than 2GB RAM
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 7B (Tables: 2)
[--] Data in InnoDB tables: 184M (Tables: 7)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[!!] Total fragmented tables: 5
-------- Security Recommendations -------------------------------------------
[!!] User '@even.example.com' has no password set.
[!!] User '@localhost' has no password set.
[!!] User 'root@127.0.0.1' has no password set.
[!!] User 'root@::1' has no password set.
[!!] User 'root@even.example.com' has no password set.
-------- Performance Metrics -------------------------------------------------
[--] Up for: 10s (9 q [0.900 qps], 6 conn, TX: 10K, RX: 625)
[--] Reads / Writes: 100% / 0%
[--] Total buffers: 176.0M global + 1.6M per thread (151 max threads)
[OK] Maximum possible memory usage: 411.9M (38% of installed RAM)
[OK] Slow queries: 0% (0/9)
[OK] Highest usage of available connections: 0% (1/151)
[OK] Key buffer size / total MyISAM indexes: 16.0M/98.0K
[!!] Query cache is disabled
[OK] Temporary tables created on disk: 0% (0 on disk / 2 total)
[!!] Thread cache is disabled
[OK] Table cache hit rate: 78% (26 open / 33 opened)
[OK] Open file limit used: 2% (21/1K)
[OK] Table locks acquired immediately: 100% (36 immediate / 36 locks)
[!!] Connections aborted: 16%
[!!] InnoDB data size / buffer pool: 184.8M/128.0M
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Set thread_cache_size to 4 as a starting value
Your applications are not closing MySQL connections properly
Variables to adjust:
query_cache_size (>= 8M)
thread_cache_size (start at 4)
innodb_buffer_pool_size (>= 184M)
输出结果简单明了,读者有兴趣可参阅官网博客
By 迦夜
2013-10-23
Happy Databasing
- MySQL性能建议者:mysqltuner.pl
- MySql 调优工具 mysqltuner.pl
- mysql性能优化建议
- MySQL性能优化建议
- 使用MySQLTuner-perl对MySQL进行优化
- Mysql性能优化小建议
- MySQL性能优化的建议
- mysql性能优化的建议
- 利用mysqltuner工具对mysql数据库进行优化
- 【mysql】MySQL性能优化建议整理
- 源码-PL/SQL从入门到精通-第十八章-PL/SQL性能优化建议-Part 1
- 源码-PL/SQL从入门到精通-第十八章-PL/SQL性能优化建议-Part 2
- mysql 性能优化的几点建议
- MySQL Innodb性能优化的建议
- mysql 性能优化的几点建议
- [mysql] 性能优化20条建议
- mysql 性能优化的几点建议
- 干货之mysql性能优化建议
- 使用Spring框架的12个开源项目
- linux 与windows 设置共享文件夹或卷盘
- ORA-01503: CREATE CONTROLFILE failed
- poj 1815 Friendship 网络流
- 黑马程序员html相关基础
- MySQL性能建议者:mysqltuner.pl
- 深入剖析WTL—WTL消息循环机制详解
- 线段树入门 以HDU 4325为例(未离散化,也没lazy标记)
- 距离和相似度度量
- linux 设备驱动编程
- aaa
- java ----线程间通讯
- 河软CSDN高校俱乐部纳新喽、、、、、、
- nginx alow deny