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-control: add new config of balance-hot-region-scheduler #6835

Merged
merged 5 commits into from
Aug 11, 2021
Merged
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
52 changes: 46 additions & 6 deletions pd-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -1005,30 +1005,52 @@ Encoding 格式示例:
{
"min-hot-byte-rate": 100,
"min-hot-key-rate": 10,
"min-hot-query-rate": 10,
"max-zombie-rounds": 3,
"max-peer-number": 1000,
"byte-rate-rank-step-ratio": 0.05,
"key-rate-rank-step-ratio": 0.05,
"query-rate-rank-step-ratio": 0.05,
"count-rank-step-ratio": 0.01,
"great-dec-ratio": 0.95,
"minor-dec-ratio": 0.99,
"src-tolerance-ratio": 1.02,
"dst-tolerance-ratio": 1.02
"src-tolerance-ratio": 1.05,
"dst-tolerance-ratio": 1.05,
"read-priorities": [
"query",
"byte"
],
"write-leader-priorities": [
"key",
"byte"
],
"write-peer-priorities": [
"byte",
"key"
],
"strict-picking-store": "true",
"enable-for-tiflash": "true"
}
```

- `min-hot-byte-rate` 指计数的最小字节,通常为 100。
- `min-hot-byte-rate` 指计数的最小字节数,通常为 100。

```bash
>> scheduler config balance-hot-region-scheduler set min-hot-byte-rate 100
```

- `min-hot-key-rate` 指计数的最小 key,通常为 10。
- `min-hot-key-rate` 指计数的最小 key,通常为 10。

```bash
>> scheduler config balance-hot-region-scheduler set min-hot-key-rate 10
```

- `min-hot-query-rate` 指计数的最小 query 数,通常为 10。

```bash
>> scheduler config balance-hot-region-scheduler set min-hot-query-rate 10
```

- `max-zombie-rounds` 指一个 operator 可被纳入 pending influence 所允许的最大心跳次数。如果将它设置为更大的值,更多的 operator 可能会被纳入 pending influence。通常用户不需要修改这个值。pending influence 指的是在调度中产生的、但仍生效的影响。

```bash
Expand All @@ -1041,7 +1063,7 @@ Encoding 格式示例:
>> scheduler config balance-hot-region-scheduler set max-peer-number 1000
```

- `byte-rate-rank-step-ratio`、`key-rate-rank-step-ratio` 和 `count-rank-step-ratio` 分别控制 byte、key、count 的 step ranks。rank step ratio 决定了计算 rank 时的 step 值。`great-dec-ratio` 和 `minor-dec-ratio` 控制 `dec` 的 rank。通常用户不需要修改这些配置项。
- `byte-rate-rank-step-ratio`、`key-rate-rank-step-ratio`、`query-rate-rank-step-ratio` 和 `count-rank-step-ratio` 分别控制 byte、key、query 和 count 的 step ranks。rank-step-ratio 决定了计算 rank 时的 step 值。`great-dec-ratio` 和 `minor-dec-ratio` 控制 `dec` 的 rank。通常用户不需要修改这些配置项。

```bash
>> scheduler config balance-hot-region-scheduler set byte-rate-rank-step-ratio 0.05
Expand All @@ -1050,7 +1072,25 @@ Encoding 格式示例:
- `src-tolerance-ratio` 和 `dst-tolerance-ratio` 是期望调度器的配置项。`tolerance-ratio` 的值越小,调度就越容易。当出现冗余调度时,你可以适当调大这个值。

```bash
>> scheduler config balance-hot-region-scheduler set src-tolerance-ratio 1.05
>> scheduler config balance-hot-region-scheduler set src-tolerance-ratio 1.1
```

- `read-priorities`、`write-leader-priorities`、`write-peer-priorities` 用于控制处理不同类型的热点时,优先均衡的第一维度和第二维度。对于 `read` 和 `write-leader` 类型的热点,可选的维度有 `query`、`byte` 和 `key`。对于 `write-peer` 类型的热点,可选的维度有 `byte` 和 `key`。若集群组件未全部升级到 v5.2 及以上版本,这些配置不会生效,固定使用兼容配置。通常用户不需要修改这些配置项。

```bash
>> scheduler config balance-hot-region-scheduler set read-priorities query,byte
```

- `strict-picking-store` 是控制热点调度搜索空间的开关,打开时会在保证稳定性的前提下进行热点调度。通常为打开,关闭后只保证第一优先级维度的均衡度,可能会导致其他维度的均衡度降低。通常用户不需要修改这个配置项。

```bash
>> scheduler config balance-hot-region-scheduler set strict-picking-store true
```

- `enable-for-tiflash` 是控制热点调度是否对 TiFlash 生效的开关。通常为打开,关闭后将不会产生 TiFlash 实例之间的热点调度。

```bash
>> scheduler config balance-hot-region-scheduler set enable-for-tiflash true
```

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