天天看点

innodb 线程

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

继续阅读