mysql dump binlog master状态

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011136197/article/details/79251727

遇到个dump binlog延迟增加的问题,发现master上的dump线程状态多数时间是 

[plain]  view plain  copy
  1. Finished reading one binlog; switching to next binlog  
[plain]  view plain  copy
  1.   
[plain]  view plain  copy
  1. 查问题要看系统IO,可能是dump程序太多,导致IO繁忙;  
[plain]  view plain  copy
  1. dba反馈load 8,iowait和ioutil并不高;但是业务在跑定时任务,导致tps很高,tps高会导致dump 变慢?这个之前没有遇到过  
[plain]  view plain  copy
  1. <img src="https://img-blog.csdn.net/20131106115023093?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYXJrYmx1ZQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">  

[plain]  view plain  copy
  1. mysql> show processlist;  
  2. +----------+---------+----------------------+------+-------------+---------+-------------------------------------------------------+------------------+-----------+---------------+-----------+  
  3. | Id       | User    | Host                 | db   | Command     | Time    | State                                                 | Info             | Rows_sent | Rows_examined | Rows_read |  
  4. +----------+---------+----------------------+------+-------------+---------+-------------------------------------------------------+------------------+-----------+---------------+-----------+  
  5. | 18618377 | jw_sync | 172.20.136.45:58226  | NULL | Binlog Dump | 1724575 | Finished reading one binlog; switching to next binlog | NULL             |         0 |             0 |       198 |  
  6. | 18618389 | jw_sync | 172.20.150.87:58321  | NULL | Binlog Dump | 1724572 | Finished reading one binlog; switching to next binlog | NULL             |         0 |             0 |       198 |  
  7. | 18618665 | jw_sync | 172.20.148.70:37864  | NULL | Binlog Dump | 1724438 | Finished reading one binlog; switching to next binlog | NULL             |         0 |             0 |       198 |  
  8. | 21133727 | jw_sync | 172.20.133.18:56499  | NULL | Binlog Dump |  578883 | Finished reading one binlog; switching to next binlog | NULL             |         0 |             0 |       198 |  
  9. | 22466211 | jw_sync | 172.23.227.174:60700 | NULL | Query       |       0 | NULL                                                  | show processlist |         0 |             0 |         2 |  
  10. +----------+---------+----------------------+------+-------------+---------+-------------------------------------------------------+------------------+-----------+---------------+  

Binlog Dump 状态一共4个

1 Sending binlog event to slave

已经读出来,正在发送

2 Finished reading one binlog; switching to next binlog

The thread has finished reading a binary log file and is opening the next one to send to the slave.

3 Master has sent all binlog to slave; waiting for binlog to be updated

等着新的binlog产生

4 Waiting to finalize termination

线程停止时候一个短暂状态


猜你喜欢

转载自blog.csdn.net/u011136197/article/details/79251727