MySQL InnoDB Background Thread threads detailed

Source: Internet
Author: User

Master Thread
The core background thread is responsible for asynchronously flushing the data in the buffer pool to disk, ensuring data consistency, including dirty page refreshes, merge insert buffering, Undo page Recycling, and so on.
master thread in the main loop, in two major operations, operations per second and every 10 seconds operation:
the operations once per second include:
1. The log buffer is flushed to disk, even though the transaction has not yet been committed (always), which explains why the big transaction commits quickly;
2, Merge Insert buffer (possibly), merge inserts not occur every second, InnoDB will determine whether the number of IO times in the current one second is less than 5, if it is, the system considers the current IO pressure is very small, you can perform the merge insert buffer operation.
3, at most, refresh the dirty page of the buffer pool of 100 InnoDB to disk (possibly), this refresh 100 dirty pages is not done every second.
operations that are done 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 page (always);
5, produce a checkpoint (checkpoing);
IO Thread
mainly responsible for the return processing of IO requests. Write, read, insert buffer, and log IO thread, respectively. The number of threads can be adjusted by parameters. 5.6 Later versions can restrict read and write threads through innodb_write_io_threads and innodb_read_io_threads, whereas before 5.6, there is only one parameter Innodb_file_io_ Threads to control the number of read and write bus threads.
purge thread
responsible for reclaiming the undo pages that have been used and assigned, the purge operation is done by default in master thread, to reduce the work of the master thread, increase CPU utilization, and improve the performance of the storage engine. The user can start the standalone 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 accelerate and increase the undo recovery speed.
Page Cleaner Thread
performs a dirty page refresh operation. Talk Dirty page brush disc.

This article is from the "do the most dedicated MySQL DBA" blog, so be sure to keep this source http://lijianjun.blog.51cto.com/11930278/1945517

MySQL InnoDB Background Thread threads detailed

Related Article

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.