dmv2.0.0-rc syncer同步非常慢

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

  • 【TiDB 版本】:tidb-4.0.0 dmdmv2.0.0-rc
  • 【问题描述】:
    DM中全量数据已经同步完了,现在是Sync阶段,但是超级慢,一个500MB的binlog,写入到tidb要一天的时间,我看tidb的压力和延迟并不大,很多连接都seelp着,感觉是syncer的问题,也调大了syncer的并发:worker-count: 64 batch: 2000。 场景是多个RDS合表到tidb。 现在的情况是:延迟慢积越大,永远也追不平,另外合表因为主键冲突所以下游tidb的表没有主键。 另外worker 日志里也没发现什么异常,倒是有很多insert 和delete 下游tidb dm_meta库的。

若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。

建议升级到 DM 2.0 GA 版本,GA 版本优化了部分增量复制的速度。

另外在query-status的输出信息中发现: “binlogType”: “remote” ,在源RDS上也发现连接状态: NULL | Binlog Dump GTID | 2864 | Sending to client 跟这会不会有关系,每一次都要从网络传输binlog[quote=“starcrush, post:1, topic:63775”]
。 另外worker 日志
[/quote]
» query-status sdy_logtracker_1
{
“result”: true,
“msg”: “”,
“sources”: [
{
“result”: false,
“msg”: “[code=38008:class=dm-master:scope=internal:level=high], Message: grpc request error, RawCause: rpc error: code = DeadlineExceeded desc = context deadline exceeded”,
“sourceStatus”: {
“source”: “package_logtracker_1”,
“worker”: “”,
“result”: null,
“relayStatus”: null
},
“subTaskStatus”: [
]
}
]
}

我tiup dm upgrade dm-drds v2.0.0升级到2.0,然后现在重启任务报错, 现在的任务和之前的worker bind不对了,咋办?

有什么办法,把worker和任务重新绑定吗

[2020/11/23 11:44:28.719 +08:00] [ERROR] [subtask.go:187] [“fail to initial subtask”] [subtask=sdy_logtracker_1] [error="[code=10001:class=database:scope=downstream:level=high], Message: fail to initial unit Sync of subtask sdy_logtracker_1 : database driver error, RawCause: context deadline exceeded, Workaround: Please check the database connection and the database config in configuration file."]
[2020/11/23 11:44:28.719 +08:00] [INFO] [task_checker.go:328] [“dispatch auto resume task”] [component=“task checker”] [task=sdy_logtracker_1]

从2.0.0rc升级到2.0.0 task起不来了.

看起来是 task 文件配置,sdy_logtracker_1 这个 task 的下游配置不正确导致的。可以尝试手工 stop task 然后再 start task 看看能否正常拉起。

谢谢,我重新起了一套DM,用的2.0.0,确实速度快了好多。

:+1: