You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -81,8 +83,12 @@ The descriptions of the columns in the `RESOURCE_GROUPS` table are as follows:
81
83
*`NAME`: the name of the resource group.
82
84
*`RU_PER_SEC`: the backfilling speed of the resource group. The unit is RU/second, in which RU means [Request Unit](/tidb-resource-control-ru-groups.md#what-is-request-unit-ru).
83
85
*`PRIORITY`: the absolute priority of tasks to be processed on TiKV. Different resources are scheduled according to the `PRIORITY` setting. Tasks with high `PRIORITY` are scheduled first. For resource groups with the same `PRIORITY`, tasks will be scheduled proportionally according to the `RU_PER_SEC` configuration. If `PRIORITY` is not specified, the default priority is `MEDIUM`.
84
-
*`BURSTABLE`: whether to allow the resource group to overuse the available system resources.
86
+
*`BURSTABLE`: whether to allow the resource group to overuse the available remaining system resources. Starting from v9.0.0, the following three modes are supported. If no value is specified for `BURSTABLE`, the `MODERATED` mode is enabled by default.
87
+
88
+
-`OFF`: indicates that the resource group is not allowed to overuse any remaining system resources.
89
+
-`MODERATED`: indicates that the resource group is allowed to overuse remaining system resources to a limited extent, with priority given to allocated resources within its quota.
90
+
-`UNLIMITED`: indicates that the resource group can overuse remaining system resources without limitation, and the excess system resources are treated as equal to the resources within the quota during allocation.
85
91
86
92
> **Note:**
87
93
>
88
-
> TiDB automatically creates a `default` resource group during cluster initialization. For this resource group, the default value of `RU_PER_SEC` is `UNLIMITED` (equivalent to the maximum value of the `INT` type, that is, `2147483647`) and it is in `BURSTABLE` mode. All requests that are not bound to any resource group are automatically bound to this `default` resource group. When you create a new configuration for another resource group, it is recommended to modify the `default` resource group configuration as needed.
94
+
> TiDB automatically creates a `default` resource group during cluster initialization. For this resource group, the default value of `RU_PER_SEC` is `UNLIMITED` (equivalent to the maximum value of the `INT` type, that is, `2147483647`) and its `BURSTABLE` mode is `UNLIMITED`. All requests that are not bound to any resource group are automatically bound to this `default` resource group. You cannot delete the `default`resource group, but can modify its RU configuration.
|`RU_PER_SEC`| Rate of RU backfilling per second |`RU_PER_SEC = 500` indicates that this resource group is backfilled with 500 RUs per second |
86
88
|`PRIORITY`| The absolute priority of tasks to be processed on TiKV |`PRIORITY = HIGH` indicates that the priority is high. If not specified, the default value is `MEDIUM`. |
87
-
|`BURSTABLE`|If the `BURSTABLE` attribute is set, TiDB allows the corresponding resource group to use the available system resources when the quota is exceeded. |
89
+
|`BURSTABLE`|Whether to allow the resource group to overuse the available remaining system resources | Starting from v9.0.0, the following three modes are supported: `OFF` indicates that the resource group is not allowed to overuse any remaining system resources. `MODERATED` indicates that the resource group is allowed to overuse remaining system resources to a limited extent. `UNLIMITED` indicates that the resource group can overuse remaining system resources without limitation. If no value is specified for `BURSTABLE`, the `MODERATED` mode is enabled by default. |
88
90
|`QUERY_LIMIT`| When the query execution meets this condition, the query is identified as a runaway query and the corresponding action is executed. |`QUERY_LIMIT=(EXEC_ELAPSED='60s', ACTION=KILL, WATCH=EXACT DURATION='10m')` indicates that the query is identified as a runaway query when the execution time exceeds 60 seconds. The query is terminated. All SQL statements with the same SQL text will be terminated immediately in the coming 10 minutes. `QUERY_LIMIT=()` or `QUERY_LIMIT=NULL` means that runaway control is not enabled. See [Runaway Queries](/tidb-resource-control-runaway-queries.md). |
89
91
|`BACKGROUND`| Configure the background tasks. For more details, see [Manage background tasks](/tidb-resource-control-background-tasks.md). |`BACKGROUND=(TASK_TYPES="br,stats", UTILIZATION_LIMIT=30)` indicates that the backup and restore and statistics collection related tasks are scheduled as background tasks, and background tasks can consume 30% of the TiKV resources at most. |
90
92
@@ -124,7 +126,7 @@ SELECT * FROM information_schema.resource_groups WHERE NAME ='rg1';
|`RU_PER_SEC`| Rate of RU backfilling per second |`RU_PER_SEC = 500` indicates that this resource group is backfilled with 500 RUs per second |
83
85
|`PRIORITY`| The absolute priority of tasks to be processed on TiKV |`PRIORITY = HIGH` indicates that the priority is high. If not specified, the default value is `MEDIUM`. |
84
-
|`BURSTABLE`|If the `BURSTABLE` attribute is set, TiDB allows the corresponding resource group to use the available system resources when the quota is exceeded. |
86
+
|`BURSTABLE`|Whether to allow the resource group to overuse the available remaining system resources | Starting from v9.0.0, the following three modes are supported: `OFF` indicates that the resource group is not allowed to overuse any remaining system resources. `MODERATED` indicates that the resource group is allowed to overuse remaining system resources to a limited extent. `UNLIMITED` indicates that the resource group can overuse remaining system resources without limitation. If no value is specified for `BURSTABLE`, the `MODERATED` mode is enabled by default. |
85
87
|`QUERY_LIMIT`| When the query execution meets this condition, the query is identified as a runaway query and the corresponding action is executed. |`QUERY_LIMIT=(EXEC_ELAPSED='60s', ACTION=KILL, WATCH=EXACT DURATION='10m')` indicates that the query is identified as a runaway query when the execution time exceeds 60 seconds. The query is terminated. All SQL statements with the same SQL text will be terminated immediately in the coming 10 minutes. `QUERY_LIMIT=()` or `QUERY_LIMIT=NULL` means that runaway control is not enabled. See [Runaway Queries](/tidb-resource-control-runaway-queries.md). |
86
88
87
89
> **Note:**
88
90
>
89
91
> - The `CREATE RESOURCE GROUP` statement can only be executed when the global variable [`tidb_enable_resource_control`](/system-variables.md#tidb_enable_resource_control-new-in-v660) is set to `ON`.
90
-
> TiDB automatically creates a `default` resource group during cluster initialization. For this resource group, the default value of `RU_PER_SEC` is `UNLIMITED` (equivalent to the maximum value of the `INT` type, that is, `2147483647`) and it is in `BURSTABLE` mode. All requests that are not bound to any resource group are automatically bound to this `default` resource group. When you create a new configuration for another resource group, it is recommended to modify the `default` resource group configuration as needed.
92
+
> TiDB automatically creates a `default` resource group during cluster initialization. For this resource group, the default value of `RU_PER_SEC` is `UNLIMITED` (equivalent to the maximum value of the `INT` type, that is, `2147483647`) and its `BURSTABLE` mode is `UNLIMTED`. All requests that are not bound to any resource group are automatically bound to this `default` resource group. You cannot delete the `default`resource group, but can modify its RU configuration.
91
93
> - Currently, only the `default` resource group supports modifying the `BACKGROUND` configuration.
92
94
93
95
## Examples
@@ -127,12 +129,12 @@ SELECT * FROM information_schema.resource_groups WHERE NAME ='rg1' or NAME = 'rg
5. To explicitly mark tasks in the current session as the background type, you can use `tidb_request_source_type` to explicitly specify the task type. The following is an example:
Copy file name to clipboardExpand all lines: tidb-resource-control-ru-groups.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -185,7 +185,7 @@ You can delete a resource group by using [`DROP RESOURCE GROUP`](/sql-statements
185
185
186
186
The following is an example of how to create a resource group.
187
187
188
-
1. Create a resource group `rg1`. The resource limit is 500 RUs per second and allows applications in this resource group to overrun resources.
188
+
1. Create a resource group `rg1`. The resource limit is 500 RUs per second and allows applications in this resource group to overrun resources. If no value is specified for `BURSTABLE`, the `MODERATED` mode is enabled by default.
189
189
190
190
```sql
191
191
CREATE RESOURCE GROUP IF NOT EXISTS rg1 RU_PER_SEC =500 BURSTABLE;
@@ -203,6 +203,12 @@ The following is an example of how to create a resource group.
203
203
CREATE RESOURCE GROUP IF NOT EXISTS rg3 RU_PER_SEC = 100 PRIORITY = HIGH;
204
204
```
205
205
206
+
4. Create a `rg4` resource group with a quota of 500 RUs per second, and allow applications in this group to use additional resources beyond the quota without limitation by setting the `BURSTABLE` mode to `UNLIMITED`.
207
+
208
+
```sql
209
+
CREATE RESOURCE GROUP IF NOT EXISTS rg4 RU_PER_SEC = 500 BURSTABLE=UNLIMITED;
210
+
```
211
+
206
212
### Bind resource groups
207
213
208
214
TiDB supports three levels of resource group settings as follows.
@@ -232,7 +238,7 @@ If there are too many requests that result in insufficient resources for the res
232
238
> **Note:**
233
239
>
234
240
> - When you bind a user to a resource group by using `CREATE USER` or `ALTER USER`, it will not take effect for the user's existing sessions, but only for the user's new sessions.
235
-
> - TiDB automatically creates a `default` resource group during cluster initialization. For this resource group, the default value of `RU_PER_SEC` is `UNLIMITED` (equivalent to the maximum value of the `INT` type, that is, `2147483647`) and it is in `BURSTABLE` mode. Statements that are not bound to a resource group are automatically bound to this resource group. This resource group does not support deletion, but you can modify the configuration of its RU.
241
+
> - TiDB automatically creates a `default` resource group during cluster initialization. For this resource group, the default value of `RU_PER_SEC` is `UNLIMITED` (equivalent to the maximum value of the `INT` type, that is, `2147483647`) and its `BURSTABLE` is `UNLIMITED` mode. All requests that are not bound to any resource group are automatically bound to this `default` resource group. You cannot delete the `default` resource group, but can modify its RU configuration.
236
242
237
243
To unbind users from a resource group, you can simply bind them to the `default` group again as follows:
0 commit comments