[Mysql] JDB2 results in high disk io utilization and high mysql latency
Reference connection: http://www.bubuko.com/infodetail-971804.html
Background: the latency of the slave database of a project is very large, combined with the large number of wsec/s in iostat, it is almost certain that the culprit of the high load of IO is redo log's flush, not data page's flush.
View innodb log buffer status
Mysql > show global status where variable_name in ('Innodb_log_waits','Innodb_buffer_pool_wait_free')
+-+ +
| | Variable_name | Value |
+-+ +
| | Innodb_buffer_pool_wait_free | 0 | |
| Innodb_log_waits | 2560 | # the number of waits to write logs due to too small log buffer. The unit is the second time.
+-+ +
Increase the values of log_buffer_pool and innodb_log_file_size, restart the database, and find that iowait decreases and slave begins to drop!
Summary: several reasons why the optimization io is too high:
1. Reference article on whether the buffer pool is too small: Ye Jinrong-what causes the disk io to be too http://mp.weixin.qq.com/s/sAGFo-h2GCBhad1r1cEWTg
two。 Is it caused by sql?
Effect of 3.innodb_io_captiy on the Stability of io http://blog.itpub.net/29096438/viewspace-2134208/
4. Other system reasons