关于master thread和io thread的关系
show engine innodb status命令输出有io threads和master thread,根据官方文档的描述:
IO thread:
InnoDB uses background threads to service various types of I/O requests. You can configure the number of background threads that service read and write I/O on data pages, using the configuration parameters innodb_read_io_threads and innodb_write_io_threads....
Master thread:
The master thread in InnoDB is a thread that performs various tasks in the background. Most of these tasks are I/O related, such as flushing dirty pages from the buffer pool or writing changes from the insert buffer to the appropriate secondary indexes. The master thread attempts to perform these tasks in a way that does not adversely affect the normal working of the server. It tries to estimate the free I/O bandwidth available and tune its activities to take advantage of this free capacity. Historically, InnoDB has used a hard coded value of 100 IOPs (input/output operations per second) as the total I/O capacity of the server.....
问题一:咋一看io threads和master thread都是处理IO的线程,那到底IO请求是哪个线程处理的?
另外在show engine innodb status命令结尾还有这样的输出:
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread id 2504, state: waiting for server activity
Number of rows inserted 0, updated 0, deleted 0, read 30
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
问题二:这里的main thread和master thread又是什么关系?