What do these two states of the region mean?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: region的这两个状态是什么意思?

| username: Kongdom

【TiDB Usage Environment】Testing
【TiDB Version】v6.5.0
【Reproduction Path】None
【Encountered Problem: Problem Phenomenon and Impact】
What do undersized-region-count and oversized-region-count mean?

| username: xfworld | Original post link

Smaller than normal region
Too large region… :upside_down_face:

| username: 裤衩儿飞上天 | Original post link

Personal guess:
undersized-region-count is the number of regions smaller than 96M, excluding empty regions.
oversized-region-count is the number of regions larger than 144M.

| username: TiDBer-s | Original post link

The terms undersized-region-count and oversized-region-count refer to the number of regions in a distributed system. Undersized-region-count refers to the number of regions that have not reached the defined region size, while oversized-region-count refers to the number of regions that exceed the defined region size.

| username: 考试没答案 | Original post link

Why do you have so many empty regions?

| username: 考试没答案 | Original post link

Did you change any parameters?

| username: xfworld | Original post link

Deleting too much data and not merging after GC will cause this, it’s normal.

| username: 考试没答案 | Original post link

After GC, it didn’t merge. Why didn’t it merge? How often does it usually merge?

| username: xfworld | Original post link

The documentation describes it, you can take a good look at the details.

As for how long it takes to merge and what the merge strategy is, it is related to the configuration. There are many posts about empty region merging on asktug that you can refer to.

As for why there are empty regions, you can refer to a PPT I wrote last year, which seems to have a recording (Wuhan community event).

| username: 考试没答案 | Original post link

Got it, thanks!

| username: Kongdom | Original post link

:sweat_smile: Test environment, data is deleted frequently.

| username: 人如其名 | Original post link

This should be: PD 配置文件描述 | PingCAP 归档文档站

mysql> show config where name like '%.max-merge-region%';
+------+---------------------+--------------------------------+--------+
| Type | Instance            | Name                           | Value  |
+------+---------------------+--------------------------------+--------+
| pd   | 192.168.31.201:2379 | schedule.max-merge-region-keys | 200000 |
| pd   | 192.168.31.201:2379 | schedule.max-merge-region-size | 20     |
+------+---------------------+--------------------------------+--------+
2 rows in set (0.01 sec)
| username: Kongdom | Original post link

There really isn’t a conclusion. I’ll go ahead and submit a documentation request.

| username: 裤衩儿飞上天 | Original post link

  1. The 96M is purely my personal guess (regions smaller than 20M will be merged).

  2. I’m not sure if undersized-region-count includes empty regions.

  3. Regarding undersized-region-count, I’m also guessing. Let’s wait for the final conclusion after the documentation request is completed.

| username: Kongdom | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.