diff --git a/pd-control.md b/pd-control.md index cc77bd8222eed..ea8d7d8bdd259 100644 --- a/pd-control.md +++ b/pd-control.md @@ -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.