In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following content mainly brings you InnoDB background thread threads analysis, the knowledge here is slightly different from books, are summed up by professional and technical personnel in the process of contact with users, have a certain experience sharing value, hope to bring help to the majority of readers.
Master thread
The core background thread is mainly responsible for asynchronously refreshing the data in the buffer pool to disk to ensure the consistency of data, including dirty page refresh, merge insertion buffer, undo page recovery and so on.
In the main cycle, Master thread is divided into two parts: operation per second and operation every 10 seconds:
Operations once per second include:
1. The log buffer is flushed to disk, even if the transaction has not been committed (always), which explains why no matter how big the transaction commit is.
2. Merge insert buffer (possible). Merge insert does not occur every second. InnoDB will determine whether the number of IO occurring in the current second is less than 5. If so, the system thinks that the current IO pressure is very small and can perform the operation of merge insert buffer.
3. Refresh at most 100 dirty pages of InnoDB buffer pool to disk (possibly). This refresh of 100 dirty pages is not done every second.
Actions every 10 seconds include:
1. Refresh 100 dirty pages to disk (possible)
2. Merge up to 5 insert buffers (always)
3. Flush the log buffer to disk (always)
4. Delete useless undo pages (always)
5. Generate a checkpoint (checkpoing)
IO thread
It is mainly responsible for the drop processing of IO requests. They are write, read, insert buffer and log IO thread. The number of threads can be adjusted by parameters. Later versions can restrict read and write threads through innodb_write_io_threads and innodb_read_io_threads, but before version 5.6, there was only one parameter, innodb_file_io_threads, to control the total number of read and write threads.
Purge thread
Responsible for recycling undo pages that have been used and allocated. The purge operation is done by default in master thread, in order to reduce the work of master thread, improve cpu utilization and improve the performance of the storage engine. You can start a stand-alone purge thread by adding the following command to the parameter file.
Innodb_purge_threads=1
Starting with the innodb1.2 version, you can specify multiple innodb_purge_threads to further speed up and speed up undo recycling.
Page cleaner thread
Perform a dirty page refresh operation. Talk about dirty pages and swipe.
For the above analysis of InnoDB background thread threads, if you need to know more, you can continue to pay attention to the innovation of our industry. If you need professional solutions, you can contact the pre-sales and after-sales on the official website. I hope this article can bring you some knowledge updates.
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.