Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiDB 写入慢(load 数据)
There is no pressure on TiDB/TiKV, but the write speed is very slow. It used to be fast, but after upgrading from 4.0.8 to 5.4, it became very slow, more than 10 times slower.
The TiKV log contains a large number of errors:
[scheduler.rs:517] [“get snapshot failed”] [err=“Error(Request(message: "peer is not leader for region 155569, leader may Some(id: 155571 store_id: 4)" not_leader { region_id: 155569 leader { id: 155571 store_id: 4 } }))”] [cid=4307487]
Please see the attached TiDB/TiKV logs.
tidb1.log.zip (2.6 MB)
tikv1.log.zip (2.4 MB)
Could you please share which SQL queries have slowed down? Is it the load operation in the TiDB logs?
Yes, the data loading has slowed down.
Is there a lot of errors like "Error(Request(message: “peer is not leader”? Please post the relevant monitoring data, such as leader drop, back off, and PD scheduling.
The leader drop did not occur, which one does PD want to look at?
Is the data being imported into a newly created table using load data? What is the approximate QPS for the import?
- If it is a newly created table, it is recommended to configure shard_rowid_bit in advance to achieve pre-partitioning and scattering, which helps to improve the import speed.
Take a clinic during the load period.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.