Mysql improves performance configuration by modifying my. conf

Source: Internet
Author: User


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 toeo

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.