【TiDB Usage Environment】Production Environment
【TiDB Version】v4.0.13
【Encountered Issue: Problem Description and Impact】
Added 2 nodes to TiKV. Adjusting region-schedule-limit=8000 did not speed up the cluster expansion.
Executing pd-ctl store limit all 200 sets the upper limit to 200. For newly added TiKV, execute store limit <store_id> 10000 add-peer. This will increase the cluster’s pressure, but if there’s no pressure, you can do it this way. The speed won’t be very fast; for 1TB of data, it will take at least a few hours.
pd-ctl, first check the store ID of the newly added node, then adjust the parameters of the corresponding store: store limit <new_store_id> 10000 add-peer, and pay attention to the IO of the entire cluster.
Adjusting Region Scheduling Speed
Log in to pd-ctl
pd-ctl -i -u http://0.0.0.0:2379
» config show
store limit // Display the speed limit for adding and removing peers for all stores
store limit add-peer // Display the speed limit for adding peers for all stores
store limit all 5 // Set the speed limit for adding and removing peers for all stores to 5 per minute
store limit 1 5 // Set the speed limit for adding and removing peers for store 1 to 5 per minute
store limit all 5 add-peer // Set the speed limit for adding peers for all stores to 5 per minute
store limit 1 5 add-peer // Set the speed limit for adding peers for store 1 to 5 per minute