Mysql improves performance by modifying my. conf _ MySQL
Source: Internet
Author: User
Mysql improves performance configuration by modifying my. conf bitsCN.com
Shell code ###################################### ############## Begin configuration for mysql Performance Improvement #################### ################################# skip-name-resolve # forbidden mySQL performs DNS resolution on external connections !! The value of back_log = 384 # back_log indicates how many requests can be stored in the stack within a short period of time before MySQL temporarily stops responding to a new request. Key_buffer_size = 256 M # key_buffer_size specifies the buffer size used for the index. increasing the size can improve the index processing performance. This parameter can be set to 384 M or M for servers with around 4 GB of memory. Max_allowed_packet = 4 M thread_stack = 256 K table_cache = 128 K sort_buffer_size = 6 M # The buffer size that can be used for sorting. Therefore, we recommend that you set the size of a server with around 4 GB to 6-8 MB. Read_buffer_size = 4 M # buffer size available for read query operations. Like sort_buffer_size, the allocated memory corresponding to this parameter is also exclusive to each connection. Join_buffer_size = 8 M # The buffer size that can be used by the joint query operation. like sort_buffer_size, the allocated memory corresponding to this parameter is exclusive to each connection. Myisam_sort_buffer_size = 64 M table_cache = 512 thread_cache_size = 64 query_cache_size = 64 M # specify the size of the MySQL Query buffer .. Tmp_table_size = 256 M max_connections = 768 # specify the maximum number of connection processes allowed by MySQL. If the Too connector Connections error message appears frequently during forum access, you need to increase the value of this parameter. Max_connect_errors = 10000000 wait_timeout = 10 # specify the maximum connection time of a request. for servers with around 4 GB of memory, you can set it to 5-10. Thread_concurrency = 8 # set this parameter to the number of logical CPUs of the server x 2. in this example, the server has two physical CPUs, and each physical CPU supports H.T hyper-threading, therefore, the actual value is 4*2 = 8 table_cache = 1024 # The larger the physical memory, the larger the setting. the default value is 2402. it is adjusted to 512-1024 and the optimal innodb_additional_mem_pool_size = 4 M # The default value is 2 M innodb_flush_log_at_trx_commit = 1 # It is set to 0 when innodb_log_buff, the default value is 1 innodb_log_buffer_size = 2 M # The default value is 1 M innodb_thread_concurrency = 4 # set the number of CPUs on your server, it is recommended that the default value is 8 key_buffer_size = 256 M # The default value is 218, and the value is adjusted to 128. the optimal tmp_table_size = 128 M # The default value is 16 M, adjusted to 64-256, the maximum value is read_buffer_size = 4 M # The default value is 64 K read_rnd_buffer_size = 16 M # The default value is 256 K sort_buffer_size = 32 M # The default value is 256 K thread_cache_size = 120 32 M ###################################### ############## mysql Performance Improvement configuration End #################### #################################
Author toeobitsCN.com
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.