当前位置:网站首页>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.
边栏推荐
- Back waves are coming!Ali produced the "second generation" container technical manual and brain map, which is too fragrant
- websocket flv 客户端解封包
- [Cloud Native] Service Industry Case - Solutions for Unpredictable Concurrency Scenarios
- 华为「天才少年」计划招募的博士们,迎来首秀!
- nodejs environment variable settings
- SEATA分布式事务
- Manage components using TiUP commands
- 数据库 - 创建数据库、表、函数等
- Applicable scenarios of TiDB tools
- tiup clean
猜你喜欢
随机推荐
Packages - Notes
GeoServer
Introduction to golang image processing library image
定时任务 corn
Data Analysis Tools - DDL operations & DML operations in HQL
481-82(105、24、82、34、153)
(科普文)什么是碎片化NFT(Fractional NFT)
TiDB tool download
Compile, link, notes - 3
GUCCI、LV等奢侈品巨头如何布局元宇宙的,其他品牌应该跟上吗?
golang modules初始化项目
二、判断 & 循环
JHM:芳环羟化双加氧酶数据库DARHD建立及相关引物评价
元宇宙的前景及四大赛道
编译、链接 - 笔记 - 3
golang modules initialization project
科研中一些常用软件清单
(Crypto essential dry goods) Detailed analysis of the current NFT trading markets
一文读懂Elephant Swap,为何为ePLATO带来如此高的溢价?
tiup install