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 #6148

Merged
merged 13 commits into from
Aug 23, 2021
52 changes: 46 additions & 6 deletions pd-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -720,30 +720,52 @@ Usage:
{
"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` means the smallest byte counted, which is usually 100.
- `min-hot-byte-rate` means the smallest number of bytes to be counted, which is usually 100.

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

- `min-hot-key-rate` means the smallest key counted, which is usually 10.
- `min-hot-key-rate` means the smallest number of keys to be counted, which is usually 10.

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

- `min-hot-query-rate` means the smallest number of queries to be counted, which is usually 10.

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

- `max-zombie-rounds` means the maximum number of heartbeats with which an operator can be considered as the pending influence. If you set it to a larger value, more operators might be included in the pending influence. Usually, you do not need to adjust its value. Pending influence refers to the operator influence that is generated during scheduling but still has an effect.

```bash
Expand All @@ -756,7 +778,7 @@ Usage:
>> scheduler config balance-hot-region-scheduler set max-peer-number 1000
```

- `byte-rate-rank-step-ratio`, `key-rate-rank-step-ratio`, and `count-rank-step-ratio` respectively mean the step ranks of byte, key, and count. The rank step ratio decides the step when the rank is calculated. `great-dec-ratio` and `minor-dec-ratio` are used to determine the `dec` rank. Usually, you do not need to modify these items.
- `byte-rate-rank-step-ratio`, `key-rate-rank-step-ratio`, `query-rate-rank-step-ratio`, and `count-rank-step-ratio` respectively mean the step ranks of byte, key, query, and count. The rank-step-ratio decides the step when the rank is calculated. `great-dec-ratio` and `minor-dec-ratio` are used to determine the `dec` rank. Usually, you do not need to modify these items.

```bash
>> scheduler config balance-hot-region-scheduler set byte-rate-rank-step-ratio 0.05
Expand All @@ -765,7 +787,25 @@ Usage:
- `src-tolerance-ratio` and `dst-tolerance-ratio` are configuration items for the expectation scheduler. The smaller the `tolerance-ratio`, the easier it is for scheduling. When redundant scheduling occurs, you can appropriately increase this value.

```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
Liuxiaozhen12 marked this conversation as resolved.
Show resolved Hide resolved
```

- `read-priorities`,`write-leader-priorities`, and `write-peer-priorities` control the first and second dimensions which have the first priority of balance when different types of hot regions are dealt with. For hot regions of `read` and `write-leader` types, the available dimensions are `query`, `byte`, and `key`. For hot regions of `write-peer`, the available dimensions are `byte` and `key`. If not all the cluster components are upgraded to v5.2 and later, these configurations do not take effect, and the compatible configurations are used. Usually, you do not need to modify these configuration items.

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

- `strict-picking-store` is a switch that controls the search space of hot region scheduling. When it is enabled and if stability is ensured, hot region scheduling will start. Usually it is enabled. When it is disabled, only the balance of dimensions of the first priority is enusred, which might reduce the balance of other dimensions. Usually, you do not need to modify this configuration item.
lhy1024 marked this conversation as resolved.
Show resolved Hide resolved

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

- `enable-for-tiflash` is a switch that controls whether hot region scheduling takes effect for TiFlash. Usually it is enabled. When it is disabled, the hot region scheduling between TiFlash instances do not start.

```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