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)06/01 Report--
This article will explain in detail whether mysql is multithreaded or not, the editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
Mysql is multithreaded. Mysql is a single-process multi-threaded database. In innodb, there are about three kinds of threads: 1, main thread Master Thread;2, IO Thread thread, for asynchronous processing of write requests; 3, purge Thread thread, for deleting undo logs.
Mysql is a single-process, multi-threaded database, and there are probably the following threads in innodb:
(1) Master Thread: this is the main thread, very core, its main purpose is to do some periodic tasks, its functions are different in different innodb versions, let's take a look at the earliest version. Early innodb Master threads have two frequency tasks, one every 1 second and the other every 10 seconds.
Every second of work:
1. Refresh the log
2. Refresh up to 100 dirty pages
3. Merge insert buffers
4. If you are free, it is background.
In fact, the first two are the most important. And only if the log is refreshed every time, and the rest need to meet the conditions, for example, if the proportion of dirty pages in the cache exceeds a threshold, it will be refreshed.
Every 10 seconds of work:
1. Refresh the log
two。 Refresh dirty pages
3. Delete undo log
4. Merge insert buffer
(2) IO Thread: mainly used to process write requests asynchronously.
(3) purge Thread: used to delete the undo log, which is a subsequent version of innodb, to separate this from the Master thread.
Finally, there is a memory diagram of innodb:
On the mysql is not multithreaded to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.