高負載下tokudb環境下sync_binlog 不同設置的影響

  • 2019 年 10 月 4 日
  • 筆記

今天上午在排查主庫的sync_binlog的時候,發現之前有幾台tokudb的sync_binlog不為1,於是修改為1了。 

但是,過了片刻,發現主庫的running thread 變高了,系統負載也變高。另外,從庫出現了延遲告警。   排查了下發現就是因為上面我們把主庫設置sync_binlog=1後導致的。  改回 sync_binlog=0 或者1000 後,各種延遲等告警都恢復了。

結論: 

   高負載下, 主庫sync_binlog=1 可能造成主庫的binlog 不能及時推送到從庫(反應在從庫的show slave statusG上就是 second_behind_master一會兒為0 一會兒又變的很大)

Tags: