Delay increases from the library, MySQL logs appear InnoDB: page_cleaner: 1000ms intended loop took 17915ms.

Today my colleagues responsible for delays from the library database increases from the library, MySQL log InnoDB: page_cleaner: 1000ms intended loop took 17915ms.

Understand why, keepalived + MySQL master replication scheme, MySQL5.7 version, wherein after switching to standby keepalived library, from the library leading to the switch back delay increases, MySQL log from InnoDB: page_cleaner: 1000ms intended loop took 17915ms.

View server top, found a large number of CPU wait occupancy

At the same time, with a view iostat also found util 100%

Online viewing methods:

1, adjust innodb_page_cleaners a larger value can best be consistent with innodb_buffer_pool_instances, but to be adjusted according to actual number of the server's CPU core

2, or a teacher leaves written http://blog.itpub.net/7728585/viewspace-2157988/

3、How to solve mysql warning: "InnoDB: page_cleaner: 1000ms intended loop took XXX ms. The settings might not be optimal "? - Stack Overflow https://stackoverflow.com/questions/41134785/how-to-solve-mysql-warning-innodb-page-cleaner-1000ms-intended-loop-took-xxx

 

This is due to the 2 core server CPU, memory to 8G, and ran two examples. So this is really too weak hardware resources.

Temporary idea is to look at MySQL parameters sync_binlog, whether innodb_flush_log_at_trx_commit double set of 1, 0 and 2 after the change, found no improvement. It seems the hardware is not optimized, after the server upgrade (cloud server) to recover from the library performance, data began to go after.

 

Guess you like

Origin www.cnblogs.com/paul8339/p/11328595.html