当前位置:网站首页>Store Limit usage documentation
Store Limit usage documentation
2022-07-30 15:52:00 【Tim's Shop】
Store Limit is a feature introduced by PD in version 3.0, which aims to control the scheduling speed in a more fine-grained manner and optimize for different scheduling scenarios.
implementation principle
PD scheduling is performed in operator units.An operator may contain multiple dispatch operations.Examples are as follows;
"replace-down-replica {mv peer: store [2] to [3]} (kind:region,replica, region:10(4,5), createAt:2020-05-18 06:40:25.775636418 +0000 UTC m=+2168762.679540369, startAt:2020-05-18 06:40:25.775684648 +0000 UTC m=+2168762.679588599, currentStep:0, peer learner steps:[add learner 20 on store 3, promote peer learneron store 3 to voter, remove peer on store 2])"
In the above example, the operator replace-down-replica includes the following operations:
- Add a learner peer on
store 3with ID20. - Promote the learner peer with ID
20onstore 3to voter. - Delete the peer on
store 2.
Store Limit implements store-level speed limit by maintaining a map of store IDs to token buckets in memory.Different operations here correspond to different token buckets. Currently, only the speed of adding learners/peers and deleting peers is limited, that is, there are two types of token buckets in each store.
After each operator is generated, it will check whether there are enough tokens in the token bucket corresponding to the included operation.If the token is sufficient, the operator will be added to the scheduled queue, and the corresponding token will be removed from the token bucket, otherwise the operator will be discarded.The token bucket will replenish tokens at a fixed rate, so as to limit the rate.
Store Limit is different from other PD limit-related parameters (such as region-schedule-limit, leader-schedule-limit, etc.)It is the consumption speed of the operator, and other limits mainly limit the production speed of the operator.Before the Store Limit feature was introduced, the scheduling speed limit was mainly global, so even if the global speed was limited, it was possible that scheduling was concentrated on some stores, thus affecting the performance of the cluster.The Store Limit can better control the scheduling behavior by further refining the granularity of the speed limit.
How to use
Store Limit related parameters can be set through pd-ctl.
View current store-limit settings
The example of viewing the limit of the current store is as follows:
store limit // Displays the speed limit for adding and removing peers from all stores.store limit add-peer // Display the speed limit for adding peers to all stores.store limit remove-peer // Display the speed limit for removing peers from all stores.
set all-store limit
The example of setting the limit of all stores is as follows:
store limit all 5 // Set the speed limit for adding and deleting peers in all stores to 5 per minute.store limit all 5 add-peer // Set the speed limit for adding peers to all stores to 5 per minute.store limit all 5 remove-peer // Set the speed limit for removing peers from all stores to 5 per minute.
Set a single-store limit
An example of setting the limit of a single store is as follows:
store limit 1 5 // Set the speed limit for adding and deleting peers in store 1 to 5 per minute.store limit 1 5 add-peer // Set the speed limit for adding peers in store 1 to 5 per minute.store limit 1 5 remove-peer // Set the speed limit for removing peers from store 1 to 5 per minute.
边栏推荐
猜你喜欢
随机推荐
深度学习遇到报错Bug解决方法(不定时更新)
GUCCI、LV等奢侈品巨头如何布局元宇宙的,其他品牌应该跟上吗?
tiup env
Is Redis really slow?
100w的数据表比1000w的数据表查询更快吗?
B+树索引页大小是如何确定的?
70 lines of code, a desktop automatic translation artifact
(Popular Science) What is Fractional NFT (Fractional NFT)
Troubleshooting TiUP
[flutter]什么是MaterialApp和Material design
How is the B+ tree index page size determined?
【云原生】灰度发布、蓝绿发布、滚动发布、灰度发布解释
Debug - Notes
How to do a good job in technology selection
TiUP FAQ
数据分析工具篇——HQL中DDL操作&DML操作
tiup list
【云原生】阿里云ARMS业务实时监控
php字符串如何去除第一个字符
JHM:芳环羟化双加氧酶数据库DARHD建立及相关引物评价









