Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure and optimize the parameters of MySQL database under high concurrency

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

What this article shares with you is about how to configure and optimize the parameters under the high concurrency of MySQL database. The editor thinks it is very practical, so I share it with you for study. I hope you can get something after reading this article.

Some examples of parameter optimization:

Thread_concurrency = 4 number of server cpu cores (real concurrent processing)

Various cache sizes

Key_buffer = 384m index block cache

Max_allowed_packet = 1m mysql server and client packet size in the process of transmitting a packet

Table_cache = 2048 number of tables opened by all threads

Sort_buffer_size = 2m pair arrangement cache

Read_buffer_size = 2m read cache

Read_rnd_buffer_size = 8m read sort cache immediately

Myisam_sort_buffer_size = 64m sort buffer allocated by MyISAM index

Thread_cache_size = 8 the number of threads saved in the cache that can be reused

Query_cache_size = 32m query cache

Tmp_table_size = 256m temporary table size

Max_heap_table_size = 256m memory table size

Delay waiting

Interactive_timeout=2880000 is valid for subsequent interactive links

Wait_timeout=2880000 is valid for the current interactive link

Number of connections

Maximum concurrency of max_connections= 5000

Max_connect_errors = 6000 is the security-related counter value in MySQL, which is responsible for preventing too many failed clients from violently cracking passwords.

Back_log=500 stack queue size

Domain name related

Analysis of skip-name-resolve Skip response

The above is how to optimize the parameters under the high concurrency of MySQL database. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report