tuning-primer.sh 性能调试工具的使用

下载地址: wget http://www.day32.com/MySQL/tuning-primer.sh

# chmod +x  tuning-primer.sh

# yum -y install bc

# ./tuning-primer.sh

注意粗体字和有颜色的字,并按照给出的建议修改相应的值

-- MYSQL PERFORMANCE TUNING PRIMER --

- By: Matthew Montgomery -

MySQL Version 5.6.32 x86_64

Uptime = 39 days 1 hrs 25 min 53 sec

Avg. qps = 34

Total Questions = 116173522

Threads Connected = 76

Server has been running for over 48hrs.

It should be safe to follow these recommendations

To find out more information on how each of these

runtime variables effects performance visit:

http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html

Visit http://www.mysql.com/products/enterprise/advisors.html

for info about MySQL‘s Enterprise Monitoring and Advisory Service

SLOW QUERIES

The slow query log is NOT enabled.

Current long_query_time = 10.000000 sec.

You have 129 out of 116173543 that take longer than 10.000000 sec. to complete

Your long_query_time seems to be fine

BINARY UPDATE LOG

The binary update log is NOT enabled.

You will not be able to do point in time recovery

See http://dev.mysql.com/doc/refman/5.6/en/point-in-time-recovery.html

WORKER THREADS

Current thread_cache_size = 9

Current threads_cached = 0

Current threads_per_sec = 0

Historic threads_per_sec = 0

Your thread_cache_size is fine

MAX CONNECTIONS

Current max_connections = 2000

Current threads_connected = 76

Historic max_used_connections = 280

The number of used connections is 14% of the configured maximum.

Your max_connections variable seems to be fine.

INNODB STATUS

Current InnoDB index space = 212 M

Current InnoDB data space = 773 M

Current InnoDB buffer pool free = 9 %

Current innodb_buffer_pool_size = 128 M

Depending on how much space your innodb indexes take up it may be safe

to increase this value to up to 2 / 3 of total system memory

MEMORY USAGE

Max Memory Ever Allocated : 468 M

Configured Max Per-thread Buffers : 2.19 G

Configured Max Global Buffers : 153 M

Configured Max Memory Limit : 2.34 G

Physical Memory : 15.65 G

Max memory limit seem to be within acceptable norms

KEY BUFFER

Current MyISAM index space = 122 K

Current key_buffer_size = 8 M

Key cache miss rate is 1 : 1717954

Key buffer free ratio = 81 %

Your key_buffer_size seems to be too high.

Perhaps you can use these resources elsewhere

QUERY CACHE

Query cache is enabled

Current query_cache_size = 1 M

Current query_cache_used = 16 K

Current query_cache_limit = 1 M

Current Query cache Memory fill ratio = 1.64 %

Current query_cache_min_res_unit = 4 K

Your query_cache_size seems to be too high.

Perhaps you can use these resources elsewhere

MySQL won‘t cache query results that are larger than query_cache_limit in size

SORT OPERATIONS

Current sort_buffer_size = 256 K

Current read_rnd_buffer_size = 256 K

Sort buffer seems to be fine

JOINS

Current join_buffer_size = 260.00 K

You have had 156110 queries where a join could not use an index properly

You should enable "log-queries-not-using-indexes"

Then look for non indexed joins in the slow query log.

If you are unable to optimize your queries you may want to increase your

join_buffer_size to accommodate larger joins in one pass.

Note! This script will still suggest raising the join_buffer_size when

ANY joins not using indexes are found.

OPEN FILES LIMIT

Current open_files_limit = 5000 files

The open_files_limit should typically be set to at least 2x-3x

that of table_cache if you have heavy MyISAM usage.

Your open_files_limit value seems to be fine

TABLE CACHE

Current table_open_cache = 2000 tables

Current table_definition_cache = 1400 tables

You have a total of 1278 tables

You have 2000 open tables.

Current table_cache hit rate is 37%

, while 100% of your table cache is in use

You should probably increase your table_cache

TEMP TABLES

Current max_heap_table_size = 16 M

Current tmp_table_size = 16 M

Of 21783978 temp tables, 3% were created on disk

Created disk tmp tables ratio seems fine

TABLE SCANS

Current read_buffer_size = 128 K

Current table scan ratio = 810 : 1

read_buffer_size seems to be fine

TABLE LOCKING

Current Lock Wait ratio = 1 : 35042

Your table locking seems to be fine

时间: 2024-11-04 21:20:42

tuning-primer.sh 性能调试工具的使用的相关文章

超级简单实用的.NET性能调试工具-----ANTS Performance Profiler

艺术字做到后期,性能成了一个比较大的瓶颈,优化性能的过程中接触了一些.NET性能调试工具,最喜欢的是ANTS Performance Profiler,操作简单,功能也跟我期望的差不多. ANTS Performance Profiler是出自大名鼎鼎的Red Gate,很多人使用过的.NET Reflector就是出自此公司,该公司还出品其他产品,具体请戳http://www.red-gate.com/products/.ANTS Performance Profiler支持.NET平台所有语

mysql性能调试工具profile

我一直在找mysql中有没有类似Oracle 10046类似的工具,可以看到SQL执行的时间消耗在哪里.终于在网上找到一个profile,使用一些,觉得不错. mysql> select version(); +-----------+ | version() | +-----------+ | 5.6.16    | +-----------+ 1 row in set (0.00 sec) mysql> SELECT @@profiling; +-------------+ | @@pro

[转帖]九大Java性能调试工具,必备至少一款

九大Java性能调试工具,必备至少一款 https://www.jianshu.com/p/d382bfe6e80e NetBeans Profiler NetBeans中可以找到NetBeans Profiler. NetBeans分析器是NetBeans的扩展,用于为NetBeans IDE提供分析功能.NetBeans IDE是一个开源的集成开发环境.NetBeans IDE支持开发所有Java应用程序类型(Java SE(包括JavaFX),Java ME,Web,EJB和移动应用程序)

苹果Instruments/Shark性能调试工具概述

在Mac OS X上你可以使用Gprof这样的UNIX工具用于测试程序性能.当然,Apple也有自己的Profiling Tools,用得比较多的是Shark.10.5里还引入了一个基于DTrace的叫Instruments的程序. Instruments 自Xcode 3.0开始,苹果提供了一种非比寻常的方法来调试应用程序,这就是Instruments.就像它的名字一样(Instruments意为乐器),Instruments提供了一种像苹果的音乐创作软件GarageBand一样的带有时间线的

开源的Delphi性能调试工具

官网:http://dbg-spider.net/源码:https://github.com/yavfast/dbg-spider Real time profiler for Delphi applications:?  Detailed debug information (internal, TDS, MAP)?  Display information for multi-threaded applications?  Timeline diagram for process execu

MySQL基础普及《MySQL管理之道:性能调优、高可用与监控》

最近工作的内容涉及MySQL运维内容,陆陆续续读了几本相关的书,其中一本是<MySQL管理之道:性能调优.高可用与监控>. 内容涵盖性能调优(包括sql优化等).备份.高可用,以及读写分离等,对于普及MySQL基础非常有用.记录一下,以便于后面查阅. 附目录: 1章 MariaDB架构与历史1 1.1 MariaDB的介绍 1 1.2 MariaDB和MySQL的兼容性 2 1.3 MariaDB 10.0新增的功能 3 1.3.1 更多的存储引擎 4 1.3.2 速度的提升 5 1.3.3

mysql性能优化之Tuning-primer.sh的使用

Tuning-primer.sh  检测mysql当前的运行情况,产生报告,并给出优化建议. 下载及使用:1.wget http://www.day32.com/MySQL/tuning-primer.sh 2.将tuning-primer.sh拷贝到my.cnf同级目录3.chmod  +xtuning-primer.sh 执行:sh tuning-primer.sh [[email protected] software]#./tuning-primer.sh all Using login

tuning-primer.sh mysql 报表

[[email protected] mytop-1.6]# wget http://www.day32.com/MySQL/tuning-primer.sh --2016-07-03 19:42:33-- http://www.day32.com/MySQL/tuning-primer.sh Resolving www.day32.com... 192.237.221.190 Connecting to www.day32.com|192.237.221.190|:80... connecte

mysql参数优化辅助工具之tuning-primer.sh

Tuning-primer.sh  检测mysql当前的运行情况,产生报告,并给出优化建议. 下载及使用:1.wget http://www.day32.com/MySQL/tuning-primer.sh 2.将tuning-primer.sh拷贝到my.cnf同级目录3.chmod  +x tuning-primer.sh 执行:sh tuning-primer.sh [[email protected] software]#./tuning-primer.sh all Using logi