Mysql database parameter file performance debugging tool: tuning-primer.sh

Source: Internet
Author: User
For more blog posts, please note: Children without umbrellas must try to run (www.xuchanggang.cn). This script is very good and can be intuitively found that the parameter configuration problems are: www. day32

For more blog posts, please note: Children without umbrellas must try to run (www.xuchanggang.cn). This script is very good and can be intuitively found that the parameter configuration problems are: http: // www. day32

For more blog posts, please note: Children without umbrellas must try to run ()


In my opinion, this script is very good, and you can intuitively find the parameter configuration problems:

Is:


The following is an example:

1. for installation, if you can connect to the Internet, use the following command directly (if you cannot connect to the Internet, use it first)

[Root @ 10-9-7-79 test] # wget

2. Grant the script execution permission:

[Root @ 10-9-7-79 test] # chmod 755 tuning-primer.sh

3. Execute the tuning-primer.sh script:

[Root @ 10-9-7-79 test] #./tuning-primer.sh

4. The following is the test result: [the test result content mainly depends on the last few lines of each test result. Pay special attention to the memory, which easily exceeds the memory configuration]

Using login values from ~ /. My. cnf
-Initial login attempt failed-
Testing for stored webmin passwords:
None Found
Cocould not auto detect login info!
Found potential sockets:/tmp/mysql. sock
Using:/tmp/mysql. sock

# I believe you can understand the following items, but I will not explain them.
Wocould you like to provide a different socket? : [Y/N] n
Do you have your login handy? [Y/N]: y
User: root
Password: 122345

Wocould you like me to create ~ /. My. cnf file for you? [Y/N]: n

-- Mysql performance tuning primer --
-By: Matthew Montgomery-

MySQL Version 5.5.37-log x86_64

Uptime = 5 days 4 hrs 11 min 46 sec
Avg. qps = 0
Total Questions = 13261
Threads Connected = 1

Server has been running for over 48hrs.
It shoshould be safe to follow these recommendations

To find out more information on how each of these
Runtime variables effects performance visit:

Visit
For info about MySQL's Enterprise Monitoring and Advisory Service

SLOW QUERIES
The slow query log is enabled.
Current long_query_time = 1.000000 sec.
You have 1533 out of 13282 that take longer than 1.000000 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is enabled
Binlog sync is not enabled, you cocould loose binlog records during a server crash

WORKER THREADS
Current thread_cache_size = 512
Current threads_cached = 5
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 1000
Current threads_connected = 1
Historic max_used_connections = 6
The number of used connections is 0% of the configured maximum.
You are using less than 10% of your configured max_connections.
Lowering max_connections cocould help to avoid an over-allocation of memory
See "memory usage" section to make sure you are not over-allocating

INNODB STATUS
Current InnoDB index space = 160 M
Current InnoDB data space = 2.10 GB
Current InnoDB buffer pool free = 46%
Current innodb_buffer_pool_size = 4.00G
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: 4.10 GB
Configured Max Per-thread Buffers: 2.31G
Configured Max Global Buffers: 4.09G
Configured Max Memory Limit: 6.41 GB
Physical Memory: 7.62G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 109 K
Current key_buffer_size = 64 M
Key cache miss rate is 1: 5
Key buffer free ratio = 81%
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 2 M
Current query_cache_used = 16 K
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio =. 82%
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 = 132.00 K
You have had 0 queries where a join cocould not use an index properly
Your joins seem to be using indexes properly

OPEN FILES LIMIT
Current open_files_limit = 65535 files
The open_files_limit shocould 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_cached = 4096 tables
Current table_definition_cache = 4096 tables
You have a total of 183 tables
You have 184 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 16 M
Of 3294 temp tables, 38% were created on disk
Perhaps you shoshould increase your tmp_table_size and/or max_heap_table_size
To reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
Ratio of on disk temp tables.

TABLE SCANS
Current read_buffer_size = 512 K
Current table scan ratio = 9703: 1
You have a high ratio of sequential access requests to SELECTs
You may benefit from raising read_buffer_size and/or improving your use of indexes.

TABLE LOCKING
Current Lock Wait ratio = 0: 13543
Your table locking seems to be fine


This article is from the blog "children without umbrellas must be running hard". Please keep this source

,

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.