-
Notifications
You must be signed in to change notification settings - Fork 1.2k
resource control: support more mode for BURSTABLE #20020
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
Co-authored-by: Roger Song <[email protected]>
Co-authored-by: Roger Song <[email protected]>
Co-authored-by: Roger Song <[email protected]>
@songrijie: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@hfxsd ptal |
Signed-off-by: lhy1024 <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Co-authored-by: Lilian Lee <[email protected]>
Co-authored-by: Lilian Lee <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
+---------+------------+----------+----------------+-------------+------------+ | ||
| NAME | RU_PER_SEC | PRIORITY | BURSTABLE | QUERY_LIMIT | BACKGROUND | | ||
+---------+------------+----------+----------------+-------------+------------+ | ||
| default | UNLIMITED | MEDIUM | YES(UNLIMITED) | NULL | NULL | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里 BURSTABLE 是不是就只显示 OFF
, UNLIMITED
, MODERATED
。 用括号不太合适。 @lhy1024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
要修改显示结果么?不过不知道代码还能不能合进去了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修改一下吧, 这个不太符合系统表的习惯。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -77,8 +79,11 @@ SELECT * FROM information_schema.resource_groups WHERE NAME = 'rg1'; -- 查看 | |||
* `NAME`:资源组名称。 | |||
* `RU_PER_SEC`:资源组的回填速度,单位为每秒回填的 [Request Unit (RU)](/tidb-resource-control-ru-groups.md#什么是-request-unit-ru) 数量。 | |||
* `PRIORITY`:任务在 TiKV 上处理的绝对优先级。不同的资源按照 `PRIORITY` 的设置进行调度,`PRIORITY` 高的任务会被优先调度。如果资源组的 `PRIORITY` 相同,则会根据 `RU_PER_SEC` 的配置按比例调度。如果不指定 `PRIORITY`,资源组的默认优先级为 `MEDIUM`。 | |||
* `BURSTABLE`:是否允许此资源组超额使用剩余的系统资源。 | |||
* `BURSTABLE`:是否允许此资源组超额使用剩余的系统资源。支持以下三种模式,如果没有为 `BURSTABLE` 指定目标值,将默认启用 `MODERATED` 模式。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `BURSTABLE`:是否允许此资源组超额使用剩余的系统资源。支持以下三种模式,如果没有为 `BURSTABLE` 指定目标值,将默认启用 `MODERATED` 模式。 | |
* `BURSTABLE`:是否允许此资源组超额使用剩余的系统资源。支持以下三种模式,若未指定,则默认启用 `MODERATED` 模式。 |
@@ -80,7 +82,7 @@ TiDB 支持以下 `DirectResourceGroupOption`, 其中 [Request Unit (RU)](/tidb- | |||
|---------------|--------------|--------------------------------------| | |||
| `RU_PER_SEC` | 每秒 RU 填充的速度 | `RU_PER_SEC = 500` 表示此资源组每秒回填 500 个 RU。 | | |||
| `PRIORITY` | 任务在 TiKV 上处理的绝对优先级 | `PRIORITY = HIGH` 表示优先级高。若未指定则默认为 `MEDIUM`。 | | |||
| `BURSTABLE` | 允许对应的资源组超出配额后使用空余的系统资源。 | | |||
| `BURSTABLE` | 是否允许此资源组超额使用剩余的系统资源 | 分为三种模式:`OFF`,表示不允许此资源组超额使用剩余的系统资源;`MODERATED`,表示有限度地允许此资源组超额使用剩余的系统资源;`UNLIMITED`,表示无限度地允许此资源组超额使用剩余的系统资源。如果没有为 `BURSTABLE` 指定目标值,将默认启用 `MODERATED` 模式。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `BURSTABLE` | 是否允许此资源组超额使用剩余的系统资源 | 分为三种模式:`OFF`,表示不允许此资源组超额使用剩余的系统资源;`MODERATED`,表示有限度地允许此资源组超额使用剩余的系统资源;`UNLIMITED`,表示无限度地允许此资源组超额使用剩余的系统资源。如果没有为 `BURSTABLE` 指定目标值,将默认启用 `MODERATED` 模式。 | | |
| `BURSTABLE` | 是否允许此资源组超额使用剩余的系统资源 | 分为三种模式:<li>`OFF`,表示不允许此资源组超额使用剩余的系统资源;</li><li>`MODERATED`,表示有限度地允许此资源组超额使用剩余的系统资源;</li><li>`UNLIMITED`,表示无限度地允许此资源组超额使用剩余的系统资源。</li>若未指定,则默认启用 `MODERATED` 模式。 | |
@@ -77,13 +79,13 @@ TiDB 支持以下 `DirectResourceGroupOption`, 其中 [Request Unit (RU)](/tidb- | |||
|---------------|--------------|--------------------------------------| | |||
| `RU_PER_SEC` | 每秒 RU 填充的速度 | `RU_PER_SEC = 500` 表示此资源组每秒回填 500 个 RU。 | | |||
| `PRIORITY` | 任务在 TiKV 上处理的绝对优先级 | `PRIORITY = HIGH` 表示优先级高。若未指定,则默认为 `MEDIUM`。 | | |||
| `BURSTABLE` | 允许对应的资源组超出配额后使用空余的系统资源。 | | |||
| `BURSTABLE` | 是否允许此资源组超额使用剩余的系统资源 | 分为三种模式:`OFF`,表示不允许此资源组超额使用剩余的系统资源;`MODERATED`,表示有限度地允许此资源组超额使用剩余的系统资源;`UNLIMITED`,表示无限度地允许此资源组超额使用剩余的系统资源。如果没有为 `BURSTABLE` 指定目标值,将默认启用 `MODERATED` 模式。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `BURSTABLE` | 是否允许此资源组超额使用剩余的系统资源 | 分为三种模式:`OFF`,表示不允许此资源组超额使用剩余的系统资源;`MODERATED`,表示有限度地允许此资源组超额使用剩余的系统资源;`UNLIMITED`,表示无限度地允许此资源组超额使用剩余的系统资源。如果没有为 `BURSTABLE` 指定目标值,将默认启用 `MODERATED` 模式。 | | |
| `BURSTABLE` | 是否允许此资源组超额使用剩余的系统资源 | 分为三种模式:<li>`OFF`,表示不允许此资源组超额使用剩余的系统资源;</li><li>`MODERATED`,表示有限度地允许此资源组超额使用剩余的系统资源;</li><li>`UNLIMITED`,表示无限度地允许此资源组超额使用剩余的系统资源。</li>若未指定,则默认启用 `MODERATED` 模式。 | |
@@ -133,7 +133,7 @@ Request Unit (RU) 是 TiDB 对 CPU、IO 等系统资源的统一抽象的计量 | |||
|
|||
下面举例说明如何创建资源组。 | |||
|
|||
1. 创建 `rg1` 资源组,限额是每秒 500 RU,并且允许这个资源组的应用超额占用资源。 | |||
1. 创建 `rg1` 资源组,限额是每秒 500 RU,并且允许这个资源组的应用超额占用资源。如果不特意指定 `BURSTABLE` 模式,则默认启用 `MODERATED` 模式。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. 创建 `rg1` 资源组,限额是每秒 500 RU,并且允许这个资源组的应用超额占用资源。如果不特意指定 `BURSTABLE` 模式,则默认启用 `MODERATED` 模式。 | |
1. 创建 `rg1` 资源组,限额是每秒 500 RU,并且允许这个资源组的应用超额占用资源。如果不指定 `BURSTABLE` 模式,则默认启用 `MODERATED` 模式。 |
@@ -151,6 +151,12 @@ Request Unit (RU) 是 TiDB 对 CPU、IO 等系统资源的统一抽象的计量 | |||
CREATE RESOURCE GROUP IF NOT EXISTS rg3 RU_PER_SEC = 100 PRIORITY = HIGH; | |||
``` | |||
|
|||
4. 创建 `rg4` 资源组,限额是每秒 500 RU,并且允许这个资源组的应用超额占用资源,其 `BURSTABLE` 模式为 `UNLIMITED`。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4. 创建 `rg4` 资源组,限额是每秒 500 RU,并且允许这个资源组的应用超额占用资源,其 `BURSTABLE` 模式为 `UNLIMITED`。 | |
4. 创建 `rg4` 资源组,限额是每秒 500 RU,并且无限度地允许这个资源组的应用超额占用资源,其 `BURSTABLE` 模式为 `UNLIMITED`。 |
Co-authored-by: xixirangrang <[email protected]>
Signed-off-by: lhy1024 <[email protected]>
First-time contributors' checklist
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions (in Chinese).
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?