In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how mysql improves performance configuration by modifying my.conf". The explanation in this article is simple and clear and easy to learn and understand. Please follow the editor's train of thought to study and learn "how mysql improves performance configuration by modifying my.conf".
Shell code
# configuring Begin### to improve mysql performance
Skip-name-resolve
# prohibit MySQL from DNS parsing external connections! IP address is used for all remote host connection authorizations
Back_log = 384
The value of the # back_log parameter indicates how many requests can be stored on the stack in a short period of time before MySQL temporarily stops responding to new requests.
Key_buffer_size = 256m
# key_buffer_size specifies the size of the buffer used for indexing, and increasing it results in better index processing performance. For servers with memory around 4GB, this parameter can be set to 256m or 384m.
Max_allowed_packet = 4m
Thread_stack = 256K
Table_cache = 128K
Sort_buffer_size = 6m
# the size of the buffer that can be used when sorting queries. Therefore, it is recommended to set it to 6-8m for servers with about 4GB memory.
Read_buffer_size = 4m
# the size of the buffer that can be used by read query operations. Like sort_buffer_size, the allocated memory corresponding to this parameter is exclusive to each connection.
Join_buffer_size = 8m
# the size of the buffer that can be used in federated query operations. Like sort_buffer_size, the allocated memory corresponding to this parameter is exclusive to each connection.
Myisam_sort_buffer_size = 64m
Table_cache = 512
Thread_cache_size = 64
Query_cache_size = 64m
# specify the size of the MySQL query buffer.
Tmp_table_size = 256m
Max_connections = 768
# specify the maximum number of connection processes allowed by MySQL. If there are frequent Too Many Connections error prompts during access, you need to increase the value of this parameter.
Max_connect_errors = 10000000
Wait_timeout = 10
# specify the maximum connection time for a request, which can be set to 5-10 for servers with memory around 4GB.
Thread_concurrency = 8
# the value of this parameter is the number of server logical CPU * 2. In this example, the server has two physical CPU, and each physical CPU supports H.T hyperthreading, so the actual value is 4 / 2 / 8.
Table_cache=1024
The larger the physical memory, the larger the setting. The default is 2402, which is best adjusted to 512-1024.
Innodb_additional_mem_pool_size=4M
# default is 2m
Innodb_flush_log_at_trx_commit=1
# set to 0 means to wait until the innodb_log_buffer_size queue is full and then store it uniformly. The default is 1.
Innodb_log_buffer_size=2M
# default is 1m
Innodb_thread_concurrency=4
# your server CPU can be set to several. It is recommended that the default is 8.
Key_buffer_size=256M
# default is 218, which is best set to 128
Tmp_table_size=128M
# default is 16m, set to 64-256 is the most popular
Read_buffer_size=4M
# default is 64K
Read_rnd_buffer_size=16M
# default is 256K
Sort_buffer_size=32M
# default is 256K
Thread_cache_size=120
# default is 60
Query_cache_size=32M
# performance improvement configuration End #
Thank you for reading, the above is the content of "how mysql improves performance configuration by modifying my.conf". After the study of this article, I believe you have a deeper understanding of how mysql improves performance configuration by modifying my.conf. Specific usage still needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.