天天看點

14.6.8 Configuring the InnoDB Master Thread IO Rate 配置InnoDB 主線程IO 速率:

14.6.8 Configuring the InnoDB Master Thread IO Rate 配置InnoDB 主線程IO 速率:


主線程 在InnoDB 是一個線程 執行各種任務在背景。


很多這些任務是I/O相關的, 比如flush dirty pages 從buffer pool或者寫changes 從insert buffer 到相應的 secondary indexes.


主要的thread 嘗試執行那些任務 不影響正常的伺服器的工作。

它嘗試建立可用的空閑的I/O 和調整它的活動來利用空閑的能力。

曆史上,InnoDB 已經使用一個寫死值為100 IOPS(輸入/輸出操作 每秒) 作為伺服器的總的I/O能力

mysql> show variables like '%innodb_io_capacity%';
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| innodb_io_capacity     | 200   |
| innodb_io_capacity_max | 2000  |
+------------------------+-------+
2 rows in set (0.00 sec)

參數innodb_io_capacity 表明了總的I/O 可用容量對于InnoDB.


這個參數應該被設定為近似的 I/O操作的總量 ,系統每秒可以執行


值依賴于你的作業系統,當 innodb_io_capacity是被設定,

master threads 評估 I/O 可用貸款用于背景任務基于設定的值


 innodb_io_capacity 設定是總的限制用于所有的buffer pool instances.

當 dirty pages被重新整理, innodb_io_capacity 限制時是被平均分到所有的buffer pool instances.