Discover mysql performance tuning parameters, include the articles, news, trends, analysis and practical advice about mysql performance tuning parameters on alibabacloud.com
Tags: comparing field name performance created description RMS emp_table style 5.7Background: The author's source data a table about 7000多万条, data size 36G, index 6G, add up table space has 40g+, similar table has 4, a total of more than 200 million Database MySQL, engine for InnoDB, version 5.7, server memory 256G, physical memory several T, hardware parameters
variables like ' max_connections '; +-----------------+-------+| variable_name | Value |+-----------------+-------+| max_connections | 256 |+-----------------+-------+ mysql> show global status like ' Max_used_connections '; Max_used_connections/max_connections * 100%≈85%The maximum number of connections is about 85% of the maximum number of connections, if the ratio is found below 10%, the maximum number of MyS
Based on the author's experience, this paper discusses two very important parameters in MySQL server optimization, namely table_cache,key_buffer_size.
Table_cache indicates the size of the table cache. When MySQL accesses a table, if there is room in the MySQL table buffer, the table is opened and placed in the table
Hardware preparation environment:
Hard drive: 16 SAS 15 k raid 5 with 512 MCache
CPU: AMD 4-core two
Memory: 16 GB
Software environment:
Operating System: RedHat AS4.6 2.6.9-67. ELsmp
Mysql: 5.0.
Performance Tuning based on different scenarios is as follows:
Scenario:
Write operations (insert, query, and delete) are intensive, and the data capacity far exceeds th
to consider increasing the load from the server to read the pressure, another situation is the MySQL configuration file Max_ Connections value is too small:Mysql> Show variables like ' max_connections ';+-----------------+-------+| variable_name | Value |+-----------------+-------+| max_connections | 256 |+-----------------+-------+The maximum number of connections for this MySQL server is 256, then query
may find that MyISAM is faster than InnoDB because MyISAM only caches indexes, while InnoDB caches data and indexes. MyISAM does not support transactions. However, if you use innodb_flush_log_at_trx_commit = 2, you can achieve close read performance (a hundred times different ).1.1 How to convert an existing MyISAM database to InnoDB:
mysql -u [USER_NAME] -p -e "SHOW TABLES IN [DATABASE_NAME];" | tail -n +
1. Macro-tuning can be considered three parts, respectively, hardware, network, software, the main consideration here is software tuning(1) Software tuning includes: table Design (Paradigm, field type, data storage engine), SQL statement Index, configuration file parameters, file system, operating system,
timed outMinprocessors//minimum number of processing threads at server creation timeMaxprocessors//Server concurrently maximum number of processing threadsUriencoding URL//Unified Encoding (iii), Tomcat operation mode optimization TOMCAT Connector has three modes of operation Bio: Blocking IO bio is the first of the three operating modes with the lowest performance. NIO: A buffer-based, Java API that provides non-blocking I/O operations also becomes
MySQL performance tuning primer script is a simple and easy-to-use mysql optimization tool. In fact, it is a shell script.
Download:
$ Wget http://www.day32.com/MySQL/tuning-primer.sh
Run
$ Sh
MySQL Management: Performance tuning, high availability and monitoring mini-bookmysql5.5.x Main Improvements1. Use InnoDB storage engine by default2. Make full use of CPU multi-core processing capability3, improve the number of brush write dirty pages and merge the number of inserts, improve I/O4, let Innodb_buffer_pool buffer pool of heat data to survive longer,
time should not be set too long, otherwise the meaning is not very good, preferably within 5 seconds, if you need a microsecond level of slow query, Consider a patch for MySQL: Http://www.percona.com/docs/wiki/release:start, remember to find the corresponding version.Turning on the slow query log may have a little impact on system performance, and if your MySQL
Key mysql database performance optimization parameters and mysql Server optimization bitsCN.com
Key parameters for mysql database performance optimization and
always pay attention to it in the design, remember. MySQL database is so hot in the internet industry, in addition to its open source features, easy to use, there is a very important factor is the scalability of a greater advantage. Each of its different storage engines has features that can be used to address a variety of different scenarios. Its Replication and Cluster features are a very effective means of enhancing extensibility.Excerpt from: "
purpose of the flow queue data is to determine the data in the table where the data will be keptis insert,update and delete, and each operation generates the corresponding log information. In MySQL, if theThe storage engine that holds the transaction, the amount of this log generation is doubled. And if we go through some mature third-party queue software toThe performance of this queue data processing fun
Tuning mysql Network Performance Debugging Tool article bitsCN.com this article is an article about Linux system network performance management skills, this section describes how to use route, netstat, and tcpdump network management testing tools and their functions.
Route
When configuring the network, you must specify
Debugging Tool for tuning mysql Network Performance: This article describes the network performance management skills of Linux systems, this section describes how to use route, netstat, and tcpdump network management testing tools and their functions.
Route
When configuring the network, you must specify the path throu
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 FoundCocould not auto detect login info!Found potential sockets:/tmp/mysql. sockUsing:/tmp/mysql. sock
# I believe you can understand the following items, but I will not explain them
memory disk
Mkdir-p/mnt/ramdisk
sudo mount-t tmpfs-o size=4000m tmpfs/mnt/ramdisk/
mv/var/lib/mysql/mnt/ramdisk/mysql
9. Use MYSQL in a NOSQL way
B-tree is still one of the most efficient indexes, and all MYSQL is still not obsolete.
Using Handlersocket to skip MySQL's SQL parsing layer,
are not frequently join. Otherwise less efficient. 3 Tuning for SQL ---Avoid full fuzzy query%like%, it will invalidate the index. ---Avoid using SQL functions directly in SQL, SQL functions invalidate cached queries and replace them with variables. ---Large-volume operations are more efficient with limit batching (avoid locking the full table), and with limit 1, it is more efficient to know that only 1 queries are taken out of the data. ---is NOT nu
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.