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: add rank-formula-version config for hot scheduler #11566

Merged
merged 7 commits into from
Oct 18, 2022
Merged
Changes from 2 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
19 changes: 17 additions & 2 deletions pd-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,8 @@ scheduler config balance-hot-region-scheduler // 显示 balance-hot-region 调
"key"
],
"strict-picking-store": "true",
"enable-for-tiflash": "true"
"enable-for-tiflash": "true",
"rank-formula-version": "v1"
}
```

Expand Down Expand Up @@ -1234,7 +1235,7 @@ scheduler config balance-hot-region-scheduler // 显示 balance-hot-region 调
scheduler config balance-hot-region-scheduler set read-priorities query,byte
```

- `strict-picking-store` 是控制热点调度搜索空间的开关,通常为打开。当打开时,热点调度的目标是保证所配置的两个维度的热点均衡。当关闭后,热点调度只保证处于第一优先级的维度的热点均衡表现更好,但可能会导致其他维度的热点不再那么均衡。通常用户不需要修改这个配置项。
- `strict-picking-store` 是控制热点调度搜索空间的开关,通常为打开。该配置项仅影响 `rank-formula-version` 为 `v1` 时的行为。当打开时,热点调度的目标是保证所配置的两个维度的热点均衡。当关闭后,热点调度只保证处于第一优先级的维度的热点均衡表现更好,但可能会导致其他维度的热点不再那么均衡。通常用户不需要修改这个配置项。

```bash
scheduler config balance-hot-region-scheduler set strict-picking-store true
Expand All @@ -1246,6 +1247,20 @@ scheduler config balance-hot-region-scheduler // 显示 balance-hot-region 调
scheduler config balance-hot-region-scheduler set enable-for-tiflash true
```

- `rank-formula-version` 用于控制热点调度使用的调度策略的算法版本,支持的值有 `["v1", "v2"]`。目前该配置的默认值为 `v1`。
Oreoxmt marked this conversation as resolved.
Show resolved Hide resolved

- `v1` 版本为 v6.3.0 之前的策略,主要关注点为调度是否降低了不同 Store 之间的负载差值,以及是否在另一维度引入副作用。
- `v2` 版本是 v6.3.0 引入的实验特性算法,改为关注 Store 之间均衡度的提升率,同时降低了对副作用的关注度。`v2` 版本对比 `strict-picking-store` 为 `true` 的 `v1` 算法更注重优先均衡第一维度,对比 `strict-picking-store` 为 `false` 的 `v1` 算法兼顾了第二维度的均衡。
Oreoxmt marked this conversation as resolved.
Show resolved Hide resolved
- 在特定场景下,`strict-picking-store` 为 `true` 的 `v1` 版本算法更为保守,只有当两个维度都变好的时候才会进行调度,有可能出现因为维度冲突无法继续均衡的情况,需要将 `strict-picking-store` 改为 `false` 才能取得更好的均衡效果。`v2` 版本算法则可以获得更好的均衡效果并减少无效调度。
shichun-0415 marked this conversation as resolved.
Show resolved Hide resolved
Oreoxmt marked this conversation as resolved.
Show resolved Hide resolved

> **警告:**
>
> 将 `rank-formula-version` 设置为 `v2` 目前为实验性特性,不建议在生产环境中使用。

```bash
scheduler config balance-hot-region-scheduler set rank-formula-version v2
```

### `store [delete | cancel-delete | label | weight | remove-tombstone | limit ] <store_id> [--jq="<query string>"]`

使用 jq 格式化输出请参考 [jq 格式化 json 输出示例](#jq-格式化-json-输出示例)。
Expand Down