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. TeeChart 的使用从入门到精通

    1.首先nutGet 进行使用 2.如果需要使用管方的Key 进行激活 3.直接上写的Demo代码 1 using System; 2 using System.Collections.Generic ...

  2. 调试分析Linux 0.00引导程序

    Bochs虚拟机的配置文件 简介 Bochs 虚拟机的配置文件 描述待启动的虚拟机的配置,例如内存大小.启动镜像.网络功能.存储配置. Bochs运行后,会先查找配置文件,解析模拟器要虚拟的系统相关信 ...

  3. Ubuntu 23.04、22.04、20.04、18.04替换国内源

    Ubuntu配置国内源 配置步骤如下: 1.Ubuntu配置文件位置:/etc/apt/sources.list 2.需要用root权限进入: sudo vi /etc/apt/sources.lis ...

  4. k8s主要概念大梳理!

    k8s已经成为了绝对热门的技术,一个上点规模的公司,如果不搞k8s,都不好意思出去见人.安装k8s要突破种种网络阻碍,但更大的阻碍还在后面... 我发现,很多k8s的文章,根本不说人话,包括那要命的官 ...

  5. LFS - Linux From Scratch 从零开始全记录 - 1 准备篇

    上次折腾 LFS 已经是好几年前了,只记得最后用 VMware 引导成功了,好多技术细节已经不记得了.趁着最近有空,再来折腾一次.这一次用的一台新的 Win10 PC,目标是在一个 U 盘上构建 LF ...

  6. flutter中显示年月日、星期与时间

    代码 import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import 'dart:async'; imp ...

  7. java常用正则表达式工具

    public class RegexUtils { /** * 是否是无效手机格式 * @param phone 要校验的手机号 * @return true:符合,false:不符合 */ publ ...

  8. 解锁华为云AI如何助力无人车飞驰“新姿势”,大赛冠军有话说

    摘要:在2020年第二届华为云人工智能大赛•无人车挑战杯赛道中,"华中科技大学无人车一队"借助华为云一站式AI开发与管理平台ModelArts及HiLens端云协同AI开发应用平台 ...

  9. 云图说|一张图看懂一站式DevOps利器——华为云DevCloud

    阅识风云是华为云信息大咖,擅长将复杂信息多元化呈现,其出品的一张图(云图说).深入浅出的博文(云小课)或短视频(云视厅)总有一款能让您快速上手华为云.更多精彩内容请单击此处. 摘要: 华为云DevCl ...

  10. 以平安银行“智能化银行3.0”实践,看火山引擎DataTester如何助推金融行业数智化进程

    作者:DataTester   银行业正在进入一场围绕客户为中心的新革命时期.流量红利逐渐消失,银行零售进入存量客户精细化经营时代:"互联网+"给金融带来更多的场景,智能化成为零售 ...