Data Migration調整Task的syncer的線程數量

  • 【TiDB 版本】:v4.0.8
  • 【问题描述】:
  1. 由於一開始在配置Data Migration的Task yml檔案時,配置的syncer線程數量=4,為了希望能更快的跟上master,是否TiDB有提供動態變更threads的方法呢?

  2. Data Migration工具有辦法像MySQL Slave一樣達到Seconds behind master=0嗎?
    我們觀察大部分時間都會落後一段binlog position

#Task部份yml內容如下:
loaders: # loader process unit specific configs, mysql instance can ref one config in it
global:
pool-size: 4
dir: “/data/dumped_data”

syncers: # syncer process unit specific configs, mysql instance can ref one config in it
global:
## syncer 并发同步 binlog event 的线程数量,默认值为 16
worker-count: 4
batch: 100

目前 DM 并为提供在线热更新 task job 的功能。
建议流程
1.stop task
2. edit task.yaml
3.start task
4.等待 5 分钟确认数据同步正常

DM 同步性能也需要结合 TiDB 的处理时延来一并分析。建议在 增加 syncer 线程数的同时,也适当增大 bacth size。以提升每天批的 statment count

1 个赞

Hi 顧問好,

Problem solved! Thank you for your advice.

:call_me_hand:

1 个赞

目前 DM 并为提供在线热更新 task job 的功能。

=> 期待 :smiley:

:+1::+1:

1 个赞

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。