当前位置:网站首页>Load Base Split usage documentation
Load Base Split usage documentation
2022-07-30 15:52:00 【Tim's Shop】
Load Base Split is a feature introduced by TiKV in version 4.0, which aims to solve the hotspot problem caused by the uneven distribution of Region access, such as full table scan of small tables.
scene description
In TiDB, it is easy to form hot spots when traffic is concentrated on certain nodes.PD will try to distribute Hot Regions as evenly as possible on each node by scheduling Hot Regions, in order to obtain better performance.
But the smallest granularity of PD scheduling is Region.If the number of hotspots in the cluster is less than the number of nodes, or if there are some hotspots whose traffic is much higher than other regions, all that can be done for the PD's hotspot scheduling is to transfer the hotspots from one node to another.Unable to put the load on the entire cluster.
This scenario is especially common in workloads with many read requests.For example, full table scans and index lookups for small tables, or frequent access to some fields.
The previous solution to this problem was to manually enter commands to split one or several hotspot regions, but there are two problems in this operation:
- Evenly splitting Regions is not necessarily the best choice. Requests may be concentrated on certain keys. Even after evenly splitting, the hot spots may still be concentrated on one of the Regions, which may require multiple evenly splitting.Achieve goals.
- Human intervention is not timely and easy to use.
implementation principle
Load Base Split will automatically split Regions based on statistics.Identify those Regions whose read traffic continues to exceed the threshold within 10s through statistics, and split these Regions at appropriate locations.When choosing the location of the split, we will try to balance the access volume of the two regions after the split, and try to avoid cross-region access.
Regions after Load Base Split will not be merged quickly.On the one hand, the PD's MergeChecker
will skip the hot Region, and on the other hand, the PD will also judge the QPS
in the heartbeat information to avoid Merge two QPS
Very high Region.
How to use
The current control parameters for Load Base Split are split.qps-threshold
(QPS threshold) and split.byte-threshold
(traffic threshold).If the sum of various read requests per second in a region exceeds the QPS threshold or the traffic threshold within 10 consecutive seconds, the region will be split.
Currently, Load Base Split is enabled by default, but the configuration is relatively conservative. split.qps-threshold
defaults to 3000
, split.byte-threshold
The default is 30MB/s.If you want to turn off this feature, set both thresholds high enough.
There are currently two ways to modify the configuration:
Modify by SQL statement, for example:
set config tikv split.qps-threshold=3000
Modified by TiKV, eg:
curl -X POST "http://ip:status_port/config" -H "accept: application/json" -d '{"split.qps-threshold":"3000"}'
Similarly, there are currently two ways to view the configuration:
View via SQL, eg:
show config where type='tikv' and name like '%split.qps-threshold%'
View via TiKV, eg:
curl "http://ip:status_port/config"
Note
Since v4.0.0-rc.2, you can use SQL statements to modify and view the configuration.
边栏推荐
- [Cloud Native] Service Industry Case - Solutions for Unpredictable Concurrency Scenarios
- flask获取post请求参数
- 如何做好技术选型
- TensorFlow custom training function
- 影像信息提取DEM
- Alluxio for Presto fu can across the cloud self-service ability
- EST综述:eDNA的多种状态以及在水环境中持久性的认知
- 经典实例分割模型Mask RCNN原理与测试
- 481-82(105、24、82、34、153)
- 70 lines of code, a desktop automatic translation artifact
猜你喜欢
随机推荐
Sentinel
nodejs环境变量设置
How to split microservices?
RISC-V调用惯例
php字符串如何去除第一个字符
golang图片处理库image简介
经典实例分割模型Mask RCNN原理与测试
TiDB 工具功能概览
TiDB 工具下载
数组元素逆置
Xshell命令
(Popular Science) What is Fractional NFT (Fractional NFT)
视频加密的误解
481-82(105、24、82、34、153)
调试 - 笔记
【为宏正名】99%的人从第一天学习C语言就自废的武功
tiup env
Promise笔记(一)
ISELED---the new choice of ambient lighting scheme
Is Redis really slow?