mysql 版本 percona 5.5 ,innodb version 1.1.8-20.1
默认的后台线程如下:
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (read thread)
I/O thread 4 state: waiting for i/o request (read thread)
I/O thread 5 state: waiting for i/o request (read thread)
I/O thread 6 state: waiting for i/o request (write thread)
I/O thread 7 state: waiting for i/o request (write thread)
I/O thread 8 state: waiting for i/o request (write thread)
I/O thread 9 state: waiting for i/o request (write thread)
1个 insert buffer thead ,1个log thead,4个 read thead 和4 个 write thead
read 和write 的线程个数分别由innodb_read_io_threads,innodb_write_io_threads控制。
master thread
master 线程用loop sleep 1 的方式控制磁盘刷新。这些操作包括
1,日志刷新到磁盘,及时这个事物没有提交,也会刷新的redo log 这就是为什么大事物一样会commit 很快的原因。
2