Mysql
MySQL InnoDB page_cleaner 設置可能不是最佳的
在 mysqld.log 中看到這個註釋:
[Note] InnoDB: page_cleaner: 1000ms intended loop took 15888ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
這裡似乎提到了這樣的事情: MySQL instancestalling “doing SYNC index”
**我的問題是:**如果在日誌中看到此註釋,應該採取什麼措施(如果有的話)?
MySQL 和作業系統版本:
mysql-community-server- 5.7.9 -1.el7.x86_64
centos-release-7-1.1503.el7.centos.2.8.x86_64
執行SHOW VARIABLES LIKE ‘innodb%’; 如建議所示:
innodb_page_cleaners | 1
innodb_page_cleaners 預設值在 MySQL 5.7.8 中從 1 更改為 4。如果頁面清理執行緒的數量超過緩衝池實例的數量,innodb_page_cleaners 會自動設置為與 innodb_buffer_pool_instances 相同的值
檢查 innodb_buffer_pool_instances:
mysql> SHOW GLOBAL VARIABLES LIKE 'innodb_buffer_pool_instances'
您只能設置
innodb_page_cleaners
為innodb_buffer_pool_instances
. 如果你想要innodb_page_cleaners=4
那麼你也需要innodb_buffer_pool_instances=4
.