14.6.9Configuring the InnoDB MasterThread I/O Rate

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.
InnoDB中的master thread是在後臺執行各種任務的線程。這些任務大部分與I/O相關,例如從緩衝池中刷新髒頁,或者將插入緩衝區中的更改寫入適當的輔助索引。master thread嘗試以不影響服務器正常工作的方式執行這些任務。它試圖估計可用的空閒I/O帶寬,並調整其活動以利用此空閒容量。從歷史上看,InnoDB使用100 IOPs(每秒輸入/輸出操作)的硬編碼值作爲服務器的總I/O容量。
The parameter innodb_io_capacity indicates the overall I/O capacity available to InnoDB. This parameter should be set to approximately the number of I/O operations that the system can perform per second. The value depends on your system configuration. When innodb_io_capacity is set, the master threads estimates the I/O bandwidth available for background tasks based on the set value. Setting the value to 100 reverts to the old behavior.
參數innodb_io_capacity表示InnoDB可用的總體I/O容量。這個參數應該設置爲系統每秒可以執行的I/O操作的數量,值取決於您的系統配置,設置innodb_io_capacity時,master threads根據設置值估計後臺任務可用的I/O帶寬。將該值設置爲100將恢復到原來的行爲。
You can set the value of innodb_io_capacity to any number 100 or greater. The default value is 200, reflecting that the performance of typical modern I/O devices is higher than in the early days of MySQL. Typically, values around the previous default of 100 are appropriate for consumer-level storage devices, such as hard drives up to 7200 RPMs. Faster hard drives, RAID configurations, and SSDs benefit from higher values.
您可以將innodb_io_capacity的值設置爲任意數字00或以上。默認值是200,反映了典型的現代I/O設備的性能比MySQL早期的性能要高。通常,以前的默認值100左右的值適用於消費級存儲設備,例如高達7200 RPM的硬盤驅動器。 更快的硬盤驅動器,RAID配置和固態硬盤從更高的值中受益
The innodb_io_capacity setting is a total limit for all buffer pool instances. When dirty pages are flushed, the innodb_io_capacity limit is divided equally among buffer pool instances. For more information, see theinnodb_io_capacity system variable description.
innodb_io_capacity設置是所有緩衝池實例的總限制。當刷新髒頁時,innodb_io_capacity限制在緩衝池實例之間平均分配。有關更多信息,請參閱innodb_io_capacity系統變量描述。
You can set the value of this parameter in the MySQL option file (my.cnf or my.ini) or change it dynamically with the SET GLOBAL command, which requires the SUPER privilege.
您可以在MySQL選項文件(my.cnf或my.ini)中設置這個參數的值,或者使用SET GLOBAL 命令動態地更改它,這需要SUPER特權。
The innodb_flush_sync configuration option causes the innodb_io_capacity setting to be ignored during bursts of I/O activity that occur at checkpoints. innodb_flush_sync is enabled by default.
innodb_flush_sync配置選項使innodb_io_capacity設置在檢查點的I/O活動爆發期間被忽略。默認情況下,innodb_flush_sync是啓用的
Formerly, the InnoDB master thread also performed any needed purge operations. In MySQL 5.6.5 and higher, those I/O operations are moved to other background threads, whose number is controlled by the innodb_purge_threads configuration option.
以前,InnoDB master thread也執行任何需要的purge 操作。在MySQL 5.6.5或更高版本中,這些I/O操作被轉移到其他後臺線程,後臺線程的數量由innodb_purge_threads配置選項控制。
For more information about InnoDB I/O performance, see Section 8.5.8, “Optimizing InnoDB Disk I/O”.
有關InnoDB I/O性能的更多信息,請看Section 8.5.8, “Optimizing InnoDB Disk I/O”.

PREV:14.6.8 Using Asynchronous I/O on Linux https://blog.51cto.com/itzhoujun/2358045
NEXT: 14.6.10 Configuring Spin Lock Polling https://blog.51cto.com/itzhoujun/2358047

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章