TiKV replicates a segment of data in Regions via the Raft state machine. As data writes increase, a Region Split happens when the size of the region or the number of keys has reached a threshold. Conversely, if the size of the Region and the amount of keys shrinks because of data deletion, we can use Region Merge to merge adjacent regions that are smaller. This relieves some stress on Raftstore.

Merge process

Region Merge is initiated by the Placement Driver (PD). The steps are:

  1. PD polls the meta information of Regions constantly.

  2. If the region size is less than max-merge-region-size and the number of keys the region includes is less than max-merge-region-keys, PD performs Region Merge on the region with the smaller one of the two adjacent Regions.

Note:

  • All replicas of the two Regions to be merged must locate on the same set of TiKVs (It is ensured by PD scheduler).
  • Newly split Regions won’t be merged within the period of time specified by split-merge-interval.
  • Region Merge won’t happen within the period of time specified by split-merge-interval after PD starts or restarts.
  • Region Merge won’t happen for two Regions that belong to different tables if namespace-classifier = table (default).

Configure Region Merge

Region Merge is enabled by default. You can use pd-ctl or the PD configuration file to configure Region Merge.

To enable Region Merge, set the following parameters to a non-zero value:

  • max-merge-region-size
  • max-merge-region-keys
  • merge-schedule-limit

You can use split-merge-interval to control the interval between the split and merge operations.

For detailed descriptions on the above parameters, refer to PD Control.

具体命令为:

tiup ctl:v6.5.3 pd config set max-merge-region-size 0
tiup ctl:v6.5.3 pd config set max-merge-region-keys 0
tiup ctl:v6.5.3 pd config set merge-schedule-limit 0

[转帖]Region Merge Config的更多相关文章

  1. iis6|iis7|配置URLRewriter|64位操作系统下|.net2.0|.net4.0|配置URLRewriter|Web.config配置详情

    想必很多ASP.NET的码友们在IIS配置伪静态被严重纠结过不止一次两次,本园主经过多次站点伪静态配置,总结了一下,IIS版本:IIS 6.IIS 7,服务器:Windows Server 2003. ...

  2. 解决error: Your local changes to the following files would be overwritten by merge

    在项目里我们一般都会把自己第一次提交的配置文件忽略本地跟踪 1 [Sun@webserver2 demo]$ git update-index --assume-unchanged <filen ...

  3. HBase相关

    hadoop和hbase节点添加和单独重启 有时候hadoop或hbase集群运行时间久了后,某些节点就会失效,这个时候如果不想重启整个集群(这种情况在很多情况下已经不被允许),这个时候可以单独重启失 ...

  4. 服务性能监控之Micrometer详解

    Micrometer 为基于 JVM 的应用程序的性能监测数据收集提供了一个通用的 API,支持多种度量指标类型,这些指标可以用于观察.警报以及对应用程序当前状态做出响应. 通过添加如下依赖可以将 M ...

  5. tidb 杂记

    tidb_biuil_stats_concurrency 执行analyze table时会分成多个小任务,可以同时执行的任务数量.tidb_distsql_scan_concurrency 在执行分 ...

  6. Lind.DDD.IoC依赖注入与面向方面的实现

    回到目录 IoC是解耦的灵魂,很难想像一个框架中没有IoC会变成什么样子,Lind.DDD里的IoC是通过Unity实现的,由依赖注入(unity)和方法拦截组成(Interception),依赖注入 ...

  7. 介绍开源的.net通信框架NetworkComms框架之九 合并DLL

    原文网址: http://www.cnblogs.com/csdev Networkcomms 是一款C# 语言编写的TCP/UDP通信框架  作者是英国人  以前是收费的 目前作者已经开源  许可是 ...

  8. C#动态属性(.NET Framework4.5支持)

    获取方法: /* 使用方法: 1. 在web.config 的<configSections> 节点中添加 <section name="customConfigs&quo ...

  9. hbase基本结构

    HBASE  基本结构一.overview1. hbase <=> NOSQL     不错,hbase 就是某种类型的nosql 数据库,唯一的区别就是他支持海量的数据.    hbas ...

  10. 大规模视觉识别挑战赛ILSVRC2015各团队结果和方法 Large Scale Visual Recognition Challenge 2015

    Large Scale Visual Recognition Challenge 2015 (ILSVRC2015) Legend: Yellow background = winner in thi ...

随机推荐

  1. st_geometry、st_transform配置及问题汇总

    1.文件配置修改 路径上一定要使用双斜杠 2.使用sde账号登录,执行以下SQL,路径按照实际环境填写. select * from user_libraries; create or replace ...

  2. 基于FPGA的数字钟设计---第三版---郝旭帅电子设计团队

    本篇为各位朋友介绍基于FPGA的数字钟设计---第三版. 功能说明: 在数码管上面显示时分秒(共计六个数码管,前两个显示小时:中间两个显示分钟:最后两个显示秒). 利用按键可以切换24/12小时制(默 ...

  3. 占位图片(Placeholder Image)

    一.引言 在网页设计和开发中,占位图片(Placeholder Image)是一种常见的技术手段,用于在用户上传图片之前或者图片加载失败时,展示一个临时替代的图片,以提高用户体验.本文将详细介绍占位图 ...

  4. JAVAEE基础知识

    JAVAEE基础知识 2018年3月,开源组织Eclipse基金会宣布,JavaEE(Enterprise Edition)被更名为JakartaEE,也就是9版本后改名Jakarta EE,也就是J ...

  5. 监控cpu高的进程shell

    #!/bin/bash while [ 1 ]do ps aux|awk '{if($3>10){print $3" => "$0}}' sleep 0.5sdone

  6. Java 获取Excel中的表单控件

    Excel中可通过[开发工具]菜单栏下插入表单控件,如文本框.单选按钮.复选框.组合框等等,插入后的控件可执行设置控件格式,如大小.是否锁定.位置.可选文字.数据源区域.单元格链接等.当Excel中已 ...

  7. C# 查找PDF页面指定区域中的文本并替换和高亮

    对PDF文档中的内容进行查找时,可针对文档全篇内容获取查找结果,也可在PDF指定页面中的特定范围内(矩形框区域)进行查找,对获取的查找结果可执行文本高亮或替换等操作,本文将对此作相关介绍(附VB.NE ...

  8. C# 在Word中添加Latex 数学公式和符号

    本篇内容介绍使用Spire.Doc for .NET在Word中添加Latex数学公式和符号的方法.编辑代码前,将Spire.Doc.dll文件添加引用至VS程序.dll文件包可通过官网下载导入(如果 ...

  9. 神经网络基础篇:详解向量化逻辑回归(Vectorizing Logistic Regression)

    向量化逻辑回归 讨论如何实现逻辑回归的向量化计算.这样就能处理整个数据集,甚至不会用一个明确的for循环就能实现对于整个数据集梯度下降算法的优化 首先回顾一下逻辑回归的前向传播步骤.所以,如果有 \( ...

  10. Karmada 结合 coreDNS 插件实现跨集群统一域名访问

    本文分享自华为云社区<Karmada 结合 coreDNS 插件实现跨集群统一域名访问>,作者:云容器大未来 . 在多云与混合云越来越成为企业标配的今天,服务的部署和访问往往不在一个 K8 ...