InnoDB 存储引擎
InnoDB 体系架构
后台线程分类
Master Thread
主要负责将缓冲池中的数据异步刷新到磁盘,保证数据的一致性。
Master Thread 具有最高的线程优先级别。其内部由多个循环(loop)组成:
主循环(loop)、后台循环(backgroup loop)、刷新循环(flush loop)、
暂停循环(suspendloop)。Master Thread 会根据数据库运行的状态在 loop、
background loop、flush loop 和 suspend loop 中进行切换。
IO Thread
IO Thread 的工作主要是负责 AIO 请求的回调(call back)处理。分为 write
thread,read thread,insert buffer thread,log IO thread。
查看读写线程数:
mysql> show variables like 'innodb_%io_threads';
+-------------------------+-------+
| Variable_name | Value |
+-------------------------+-------+
| innodb_read_io_threads | 4 |
| innodb_write_io_threads | 4 |
+-------------------------+-------+
2 rows in set
评论