当前位置:网站首页>Region 性能调优
Region 性能调优
2022-07-17 14:46:00 【添香小铺】
本文介绍了如何通过调整 Region 大小等方法对 Region 进行性能调优以及如何在大 Region 下使用 bucket 进行并发查询优化。
概述
TiKV 自动将底层数据进行分片,所有数据按照 key 的范围划分为若干个 Region。当某个 Region 的大小超过一定限制后,TiKV 会将它分裂为多个 Region。
在大量数据的场景下,可能会出现 Region 数量过多,从而带来更多的资源开销和导致性能回退的问题。在固定数据量下,Region 越大,则 Region 个数越少。从 v6.1.0 开始,TiDB 支持设置自定义的 Region 大小。Region 默认的大小约为 96 MiB,将其调大可以减少 Region 个数。
开启 Hibernate Region 或 Region Merge 也可以减少过多 Region 带来的性能开销。
使用 region-split-size 调整 Region 大小
警告
自定义 Region 大小是在 TiDB v6.1.0 引入的实验特性,不建议在生产环境中配置。使用此特性的风险包括:
- 更容易发生性能抖动。
- 查询性能回退,尤其是大范围数据查询的性能会有回退。
- 调度变慢。
Region 的大小可以通过 coprocessor.region-split-size 进行设置。推荐的 Region 大小为 96 MiB、128 MiB、256 MiB。region-split-size 越大,性能会越容易发生抖动。不推荐将 Region 大小设置超过 1 GiB,强烈建议不超过 10 GiB。如果你使用了 TiFlash,则 Region 大小不能超过 256 MiB。如果使用 Dumpling 工具,则 Region 大小不能超过 1 GiB。Region 调大以后,使用 Dumpling 工具时,需要降低并发,否则 TiDB 会有 OOM 的风险。
使用 bucket 增加并发
警告
当前该功能为实验特性,不建议在生产环境中使用。
Region 调大以后,为了增加查询并发,应当设置 coprocessor.enable-region-bucket 为 true。这个配置会将每个 Region 划分为更小的区间 bucket,并且以这个更小的区间作为并发查询单位,以提高扫描数据的并发度。bucket 的大小通过 coprocessor.region-bucket-size 来控制,默认值为 96MiB。
边栏推荐
- Delegate parents and other loaders
- 466-82(3、146、215)
- How to change and reset forgotten root password in RHEL 9
- Tier defect detection using full revolutionary network
- Dream CMS foreground search SQL injection
- AT5147-[AGC036D]Negative Cycle【dp,模型转换】
- Introduction of database lock, shared with InnoDB, exclusive lock
- 03-2、
- Cv02 Roge matrix, rotation vector, angle
- Leetcode 1328. 破坏回文串(可以,已解决)
猜你喜欢

From "passive" to "active", how can zeta technology help to upgrade "rfid2.0"?

【无标题】cv 学习1转换

Leetcode 1328. Destroy palindrome string (yes, solved)

Unity高版本退回低版本报错问题

Performance optimization @contented to reduce pseudo sharing

Powercli script performance optimization

Will causal learning open the next generation of AI? Chapter 9 Yunji datacanvas officially released the open source project of ylarn causal learning

Detailed explanation of MySQL show processlist

TCP congestion control details | 7 Surpass TCP

MySQL autoincrement ID, UUID and snowflake ID
随机推荐
The basic establishment of the sequence table and the related operations of adding, deleting, modifying and querying (the sequence table described in C language)
Detailed explanation of MySQL show processlist
【无标题】cv 学习1转换
An error, uncaught typeerror: modalfactory is not a constructor
A curated list of awesome Qt and QML
Use and principle of ThreadLocal variable
02-3. Difference between pointer and reference
Resources for physics based simulation in computer graphics
常用getshell工具的下载
Introduction to replacement technology of SAP ABAP CDs view view
LeetCode 558. Intersection of quadtree
Leetcode 1328. Destroy palindrome string (yes, solved)
Delegate parents and other loaders
Transport layer -------- TCP (I)
Limit query of MySQL optimization series
To build agile teams, these methods are indispensable
Introduction to the universal theme system of SAP appgyver
Four methods of traversing key value in map
Today's sleep quality record 79 points
JVM钩子hooks函数