Discover mysql performance tuning parameters, include the articles, news, trends, analysis and practical advice about mysql performance tuning parameters on alibabacloud.com
MySQL Performance Optimization-max_connections configuration parameters analysis MySQL max_connections parameters are used to set the maximum number of connections (users. Each user connected to MySQL is counted as a connection. t
As InnoDB is a robust transactional storage engine that has been used for more than 10 years, some heavyweight Internet companies (Yahoo, Google Netease, Taobao) are also frequently used.I often use InnoDB in my daily work. Now I will list some parameters that can improve the performance of InnoDB.1. innodb_additional_mem_pool_sizeIn addition to caching table data and indexes, you can allocate cache for oth
First, Thread_cache
MySQL inside in order to improve the performance of the client request creation connection process, a connection pool is provided, which is the Thread_cache pool, where the idle connection thread is placed in the connection pool instead of being destroyed immediately. The advantage is that MySQL does not immediately create a connection when t
the ulimit-aH command displays the hard limit (before Kernel Parameters in proc are not adjusted, you cannot add restrictions ).Performance tips for third-party Linux applicationsThere are also many performance optimization skills for third-party applications running on Linux. These skills can help you improve the performanc
Explanation of MySQL performance parameters: Skip-External-Locking parameter introduction, mysqlskiplocking
MySQL configuration file my. cnf contains a line of skip-external-locking parameters by default, that is, "skip external lock ". According to the official explanation
; FLUSH HOSTS;
Command. When this client successfully connects to a MySQL server, the max_connect_errors for this client are zeroed out. Impact and wrong formIf the setting of the max_connect_errors is too small, the Web page may prompt that the database server cannot be connected, and the MySQL command to SSH to the database will return
ERROR 1129 (00000): Host ' Gateway ' is blocke
the operating system cache and flush log to disk (does not do anything when the transaction commits, this setting will lose at least one second of the transaction when MySQL crashes); (2) 1[default]: Execute log write cache on each transaction commit, and FULSH log to disk (this is the safest setting, no transaction is lost, but performance is not ideal); (3) 2[recommendation]: Each transaction commits, th
FineReport performance tuning methods, finereport Performance TuningThe basic idea of FineReport performance optimization is to properly set the memory size of the application server.
Generally, the default memory configuration of the server is relatively small. In larger application projects, this memory is not enough
a particular data, but rather to control the dirty Page that can be used in InnoDB buffer Pool without writing to the data file. (Dirty data that has been repaired but has not yet been written to the data file from memory). The larger the scale value, the smaller the write operation from memory to disk, so that the disk IO of the write operation can be reduced to some extent.However, if the scale value is too large, the time to restart after the database Crash may be very long because there wil
of sequential scans, you might want to add that value. The default value is 131072 (128K) and I change it to 16773120 (16M)
(6), Sort_buffer:Each thread that needs to be sorted allocates a buffer of that size. Increase this value to accelerate the order by or group by action. The default value is 2097144 (2M) and I change it to 16777208 (16M).
(7), Table_cache:The number of tables opened for all threads. Increasing this value can increase the number of file descriptors required by mysqld.
zeroed out. Impact and error forms if the settings of the max_connect_errors are too small, the Web page may prompt that the database server cannot be connected, and the MySQL command via SSH will return ERROR if the database is connected1129(00000): Host ' Gateway ' isBlocked because of many connection errors; Unblock with ' mysqladmin flush-hosts ' error. function and function in general, it is recommended that the database server does not listen f
: This article mainly introduces Mysql database optimization series (II) ------ AWK script Statistics database performance parameters. if you are interested in PHP tutorials, refer to it. 1. View database performance:
Show status;
Select several important parameters
First, to view the performance of the database:
Show status;
Pick out some of the more important parameters
Second, awk simple script programming to achieve database performance statistics
1. New VI Score.txt
2. Write down the following data:
3. Refresh once per second and write a file for analysis
Iii. Introduction to the awk syntax
Awk is a simple, literal
the code code as follows: [[email protected]~]# vi/etc/my.cnf Find the Max_connections line, modify to (if not, add it yourself), copy the code as follows: Max_connections= +The 1000 above is the value of the parameter. 3, real-time (temporary) modify the value of this parameter first login to MySQL, execute the following command: Copy the code as follows: [[email protected]~]# Mysql-uroot-p then enter the
Table_cache is a very important MySQL performance parameter. It is called table_open_cache in Versions later than 5.1.3. Table_cache is mainly used to set the number of table caches. Since each client connection accesses at least one table, the value of this parameter is related to max_connections.
Cache Mechanism
When a connection accesses a table, MySQL checks
super fast, but with limited write times.Next, we can tune the file system configuration, for Linux EXT3/4, almost in all cases, one of the parameters is to turn off the file system access time, under/etc/fstab to see if your file system has noatime parameters (in general, should have), Another is Dealloc, which allows the system to optimize the writer by making the last minute decision on which block to u
.(9) MySQL search functionSearch with MySQL in order to be able to search in Chinese with no caseSpecify--default-character-set=gb2312 only when starting mysqld(10), Wait_timeout:The number of seconds the server waits for an action on a connection before shutting it down. The default value is 28800, I change it to 7200.Note: Parameters can be adjusted by modifyin
. When this client successfully connects to a MySQL server, the max_connect_errors for this client are zeroed out.Impact and wrong formIf the setting of the max_connect_errors is too small, the Web page may prompt that the database server cannot be connected, and the MySQL command to SSH to the database will return 1129 (00000 is blocked because of many connection errors; unblock with ' mysqladmin flush-hos
need to be manipulated during this process. If you do not stop the server, you must run it at least first
1
mysqladmin flush-tables
command, otherwise the data table may appear to be abnormal.Parameter usage InstructionsIf you are a multi-server environment and want to open the external locking feature, comment out this line
1
# skip-external-locking
If it is a single-server environment, disable it and use the following statement
of Tomcat's use of memory solves this problem."%tomcat_home%\bin\catalina.sh" file, add the following settings at the beginning of the file:java_opts=-xms2048m-xmx2048mXMX is used to set the maximum amount of memory your application can use, and if the program is going to take a lot of memory, you need to modify the value to increase this number.XMS is used to set the program initialization when the memory stack size, increase this value, your program's startup
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.