Mysql monitoring tool tuning-primer.sh

Source: Internet
Author: User

Mysql monitoring tool tuning-primer.sh mysql operations, we can step by step to view, analysis. This takes some time, today we recommend you a good script tuning-primer.sh, can help us to view the msyql operation, generate a report and give some suggestions, we can according to these suggestions, optimize mysql based on the actual situation of the mysql server. : Wget requests

[html] [root@mwtec-80 data]# sh tuning-primer.sh   which: no bc in (/usr/local/cmake/bin:/usr/local/mysql3306/bin:/home/hadoop/hadoop-0.20.2/bin:/usr/java/jdk1.6.0_26/bin:/usr/java/jdk1.6.0_26/jre/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/hadoop/pig-0.10.1/bin:/root/bin)  Error: Command line calculator 'bc' not found!  

 

Install bc:
Yum install bc [root @ mwtec-80 mysql3306] #. /tuning-primer.sh -- mysql performance tuning primer ---By: Matthew Montgomery-MySQL Version 5.6.12 x86_64Uptime = 0 days 1 hrs 55 min 50 secAvg. qps = 0 Total Questions = 50 Threads Connected = 1 Warning: Server has not been running for at least 48hrs. it may not be safe to use these recommendationsTo find out more information on how each of theseruntime variables effects performance visit: http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.htmlVisit  http://www.mysql.com/products/enterprise/advisors.htmlfor Info about MySQL's Enterprise Monitoring and Advisory ServiceSLOW QUERIES -- slow query The slow query log is NOT enabled. current long_query_time = 10.000000 sec. you have 0 out of 71 that take longer than 10.000000 sec. to completeYour long_query_time seems to be fineBINARY UPDATE LOGThe binary update log is NOT enabled. you will not be able to do point in time recoverySee http://dev.mysql.com/doc/refman/5.6/en/point-in-time-recovery.htmlWORKER THREADS -- worker thread Current CONNECTIONS = 9 Current threads_cached = 0 Current threads_per_sec = 0 Historic threads_per_sec = 0 Your CONNECTIONS is fineMAX CONNECTIONS -- maximum number of CONNECTIONS Current max_connections = 151 Current threads_connected = 1 Historic CONNECTIONS = 1 number of used connections is 0% of the configured maximum. you are using less than 10% of your configured max_connections.Lowerin G max_connections cocould help to avoid an over-allocation of memorySee "memory usage" section to make sure you are not over-allocatingINNODB STATUS Current InnoDB index space = 0 bytesCurrent InnoDB data space = 80 KCurrent innoDB buffer pool free = 97% Current innodb_buffer_pool_size = 128 MDepending on how much space your innodb indexes take up it may be safeto increase this value to up to 2/3 Of total system memoryMEMORY USAGE -- Memory USAGE Max Memory Ever Allocated: 154 MConfigured Max Per-thread Buffers: 169 MConfigured Max Global Buffers: 153 MConfigured Max Memory Limit: 322 MPhysical Memory: 3.61 GMax memory limit seem to be within acceptable normsKEY BUFFER -- key buffer usage of myisam table No key reads ?! Seriously look into using some indexesCurrent MyISAM index space = 108 KCurrent key_buffer_size = 8 MKey cache miss rate is 1: 0Key buffer free ratio = 81% Your key_buffer_size seems to be fineQUERY CACHE -- Query cache of cache conditions is enabledCurrent query_cache_size = 1 MCurrent Limit = 16 KCurrent Limit = 1 MCurrent Query CACHE Memory fill ratio = 1.64% current query_cache_min_res_unit = 4 KYour query_cache_size seems to be too high. perhaps you can use these resources without won't cache query results that are larger than OPERATIONS in sizeSORT operations -- sorting Current sort_buffer_size = 256 KCurrent conditions = 256 KNo sort OPERATIONS have been limit medsort buffer seems to be fineJOINS -- connection status Current join_buffer_size = 260.00 KYou have had 0 queries where a join cocould not use an index properlyYour joins seem to be using indexes properlyOPEN files limit -- Current open_files_limit = 5000 filesThe open_files_limit shocould typically be set to at least 2x-3xthat of table_cache if you have heavy MyISAM usage. your open_files_limit value seems to be fineTABLE CACHE -- Current table CACHE Usage table_open_cache = 2000 tablesCurrent table_definition_cache = 1400 tablesYou have a total of 80 tablesYou have 80 open tables. the table_cache value seems to be fineTEMP TABLES -- Current max_heap_table_size = 16 MCurrent tmp_table_size = 16 MOf 337 temp tables, 10% were created on diskCreated disk tmp tables ratio seems fineTABLE SCANS -- Current read_buffer_size = 128 KCurrent table scan ratio = 6: 1read_buffer_size seems to be fineTABLE LOCKING -- Current Lock Wait ratio = 0: 326 Your table locking seems to be fine

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.