Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pd: update default value of max-merge-region-size #18291

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions best-practices/pd-scheduling-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ Region merge 指的是为了避免删除数据后大量小甚至空的 Region

具体来说,当某个新分裂出来的 Region 存在的时间超过配置项 [`split-merge-interval`](/pd-configuration-file.md#split-merge-interval) 的值(默认 1h)后,如果同时满足以下情况,该 Region 会触发 Region merge 调度:

- 该 Region 大小小于配置项 [`max-merge-region-size`](/pd-configuration-file.md#max-merge-region-size) 的值(默认 20 MiB)
- 该 Region 中 key 的数量小于配置项 [`max-merge-region-keys`](/pd-configuration-file.md#max-merge-region-keys) 的值(默认 200000
- 该 Region 大小小于配置项 [`max-merge-region-size`](/pd-configuration-file.md#max-merge-region-size) 的值(默认 54 MiB)
- 该 Region 中 key 的数量小于配置项 [`max-merge-region-keys`](/pd-configuration-file.md#max-merge-region-keys) 的值(默认 540000

## 查询调度状态

Expand Down
4 changes: 2 additions & 2 deletions pd-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,13 @@ pd-server 相关配置项。
### `max-merge-region-size`

+ 控制 Region Merge 的 size 上限,当 Region Size 大于指定值时 PD 不会将其与相邻的 Region 合并。
+ 默认:20
+ 默认:54 (8.2.0 及之前版本默认值为 20)
+ 单位:MiB

### `max-merge-region-keys`
HuSharp marked this conversation as resolved.
Show resolved Hide resolved

+ 控制 Region Merge 的 key 上限,当 Region key 大于指定值时 PD 不会将其与相邻的 Region 合并。
+ 默认:200000
+ 默认:540000(8.2.0 及之前版本默认值为 200000

### `patrol-region-interval`

Expand Down
4 changes: 2 additions & 2 deletions pd-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ config show
"leader-schedule-limit": 4,
"leader-schedule-policy": "count",
"low-space-ratio": 0.8,
"max-merge-region-keys": 200000,
"max-merge-region-size": 20,
"max-merge-region-keys": 540000,
"max-merge-region-size": 54,
"max-pending-peer-count": 64,
"max-snapshot-count": 64,
"max-store-down-time": "30m0s",
Expand Down
2 changes: 2 additions & 0 deletions releases/release-8.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ TiDB 版本:8.2.0
| TiKV | [`max-apply-unpersisted-log-limit`](/tikv-configuration-file.md#max-apply-unpersisted-log-limit-从-v810-版本开始引入) | 修改 | 默认值从 `0` 修改为 `1024`,代表允许 apply 已经 `commit` 但尚未持久化的 Raft 日志的最大数量为 1024,用于降低 TiKV 节点上因 I/O 抖动导致的长尾延迟。 |
| TiKV | [`server.grpc-compression-type`](/tikv-configuration-file.md#grpc-compression-type) | 修改 | 该配置项现在也会影响 TiKV 向 TiDB 发送的响应消息的压缩算法。开启压缩可能消耗更多 CPU 资源。 |
| TiFlash | [`security.redact_info_log`](/tiflash/tiflash-configuration.md#配置文件-tiflashtoml) | 修改 | 可选值新增 `marker` 选项。当配置项的值设置为 `marker` 时,日志中的用户数据会被标记符号 `‹ ›` 包裹。 |
| PD | [`schedule.max-merge-region-size`](/pd-configuration-file.md#max-merge-region-size) | 修改 | 默认值从 `20` MiB 修改为 `54` MiB。 |
| PD | [`schedule.max-merge-region-keys`](/pd-configuration-file.md#max-merge-region-keys) | 修改 | 默认值从 `200000` 修改为 `540000`。 |

### 编译器版本

Expand Down
Loading