tidb-lightning工具测试,日志警告

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

  • 【TiDB 版本】:3.0.12
  • 【问题描述】:问题1:使用docker版tidb测试tidb-lightning工具,导入速度很慢,日志中频繁出现警告信息 [WARN] [tikv.go:136] [“switch mode failed”] [mode=Import] [takeTime=20.000374629s] [error=“rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = “transport: Error while dialing dial tcp: i/o timeout””];

tidb-lightning.log (138.8 KB) tikv-importer.log (872.6 KB)

问题2: 设置tidb模式从导数模式为普通模式报错!!

[root@stress-c bin]# ./tidb-lightning-ctl --config ./tidb-lightning.toml --switch-mode=normal rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = “transport: Error while dialing dial tcp: i/o timeout” ![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/errors.AddStack /home/jenkins/agent/workspace/release_tidb_3.0/go/pkg/mod/![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/errors@v0.11.5-0.20190809092503-95897b64e011/errors.go:174 ![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/errors.Trace /home/jenkins/agent/workspace/release_tidb_3.0/go/pkg/mod/![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/errors@v0.11.5-0.20190809092503-95897b64e011/juju_adaptor.go:15 ![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb-lightning/lightning/backend.SwitchMode.func1 /home/jenkins/agent/workspace/release_tidb_3.0/go/src/![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb-lightning/lightning/backend/tikv.go:134 ![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb-lightning/lightning/backend.withTiKVConnection /home/jenkins/agent/workspace/release_tidb_3.0/go/src/![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb-lightning/lightning/backend/tikv.go:88 ![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb-lightning/lightning/backend.SwitchMode /home/jenkins/agent/workspace/release_tidb_3.0/go/src/![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb-lightning/lightning/backend/tikv.go:130 main.switchMode.func1 /home/jenkins/agent/workspace/release_tidb_3.0/go/src/![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb-lightning/cmd/tidb-lightning-ctl/main.go:141 ![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb-lightning/lightning/backend.ForAllStores.func1 /home/jenkins/agent/workspace/release_tidb_3.0/go/src/![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)github.com/pingcap/tidb-lightning/lightning/backend/tikv.go:121 ![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)golang.org/x/sync/errgroup.(*Group).Go.func1 /home/jenkins/agent/workspace/release_tidb_3.0/go/pkg/mod/![](file:///C:\Users\Admin\AppData\Local\Temp%W@GJ$ACOF(TYDYECOKVDYB.png)golang.org/x/sync@v0.0.0-20190911185100-cd5d95a43a6e/errgroup/errgroup.go:57 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1357

  1. 看起来transport: Error while dialing dial tcp: i/o timeout 是无法访问了
  2. 请问是使用的单机docker在测试lightning吗? 只有一个服务器? 配置满足要求吗? lightning是高资源的消耗,建议先按照要求配置,再来测试,不然像IO这些性能很容易成为瓶颈.

是单机的docker,lightning是单独部署在一台8C 32G的服务器上,想做一个简单的测试,有没有啥好的建议??

建议tidb用标准配置,docker在单机上部署的,很大情况下撑不住, 根据报错应该是IO满了,你可以查看一下导入时的tidb监控信息.

好的,麻烦了

:handshake: