Skip to content

Commit

Permalink
pd-ctl: add resource-manager command (#16517) (#16519)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Feb 19, 2024
1 parent 24ae71e commit bd035d3
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions pd-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,42 @@ Usage:
}
```
### `resource-manager [command]`
#### View the controller configuration of Resource Control
```bash
resource-manager config controller show
```
```bash
{
"degraded-mode-wait-duration": "0s",
"ltb-max-wait-duration": "30s",
"request-unit": { # Configurations of RU. Do not modify.
"read-base-cost": 0.125,
"read-per-batch-base-cost": 0.5,
"read-cost-per-byte": 0.0000152587890625,
"write-base-cost": 1,
"write-per-batch-base-cost": 1,
"write-cost-per-byte": 0.0009765625,
"read-cpu-ms-cost": 0.3333333333333333
},
"enable-controller-trace-log": "false"
}
```
- `ltb-max-wait-duration`: the maximum waiting time of Local Token Bucket (LTB). The default value is `30s`, and the value range is `[0, 24h]`. If the estimated [Request Unit (RU)](/tidb-resource-control.md#what-is-request-unit-ru) consumption of the SQL request exceeds the current accumulated RU of LTB, the request needs to wait for a certain period of time. If the estimated waiting time exceeds this maximum value, an error message [`ERROR 8252 (HY000) : Exceeded resource group quota limitation`](/error-codes.md) is returned to the application in advance. Increasing this value can reduce the occurrence of encountering `ERROR 8252` in cases of sudden concurrency increase, large transactions, and large queries.
- `enable-controller-trace-log`: control whether to enable the controller diagnostic log.
#### Modify the controller configuration of Resource Control
To modify the `ltb-max-wait-duration` configuration, use the following command:
```bash
pd-ctl resource-manager config controller set ltb-max-wait-duration 30m
```
### `scheduler [show | add | remove | pause | resume | config | describe]`
Use this command to view and control the scheduling policy.
Expand Down

0 comments on commit bd035d3

Please sign in to comment.