Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: region-schedule-limit和leader-schedule-limit的区别
The difference between region-schedule-limit and leader-schedule-limit in PD
Does region-schedule-limit include both leader nodes and follower nodes?
I hope the expert can clear up my confusion. 
The leader-schedule-limit
can control the number of leader scheduling tasks being executed simultaneously. The region-schedule-limit
can control the number of Region scheduling tasks being executed simultaneously. The operators generated by the scheduler may contain multiple operations. These two limits restrict the overall scheduling speed from different perspectives of leader and region. Leader scheduling does not involve data movement, while region scheduling involves data movement.
These two things limit the generation speed of operators on the PD side. The actual speed will also be limited by the store limit consumption speed on the TiKV side.
The configuration in tikv/pd limits the concurrency during actual scheduling.
regionAllowed := s.OpController.OperatorCount(operator.OpRegion) < conf.GetRegionScheduleLimit()
leaderAllowed := s.OpController.OperatorCount(operator.OpLeader) < conf.GetLeaderScheduleLimit()
The leader-schedule-limit
can control the number of leader scheduling tasks that are performed simultaneously. The region-schedule-limit
can control the number of Region scheduling tasks that are performed simultaneously. These parameters manage scheduling objects from two different perspectives.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.