Skip to content

Commit

Permalink
[Doc] SHOW RESOURCE GROUP docfix
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Satardekar <[email protected]>
  • Loading branch information
rohitrs1983 committed Jan 19, 2025
1 parent 952799a commit da8cd87
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ SHOW { RESOURCE GROUPS [ALL] | RESOURCE GROUP <resource_group_name> }
| -------------------------- | ------------------------------------------------------------ |
| name | Name of the resource group. |
| id | ID of the resource group. |
| cpu_core_limit | CPU core limit of the resource group. |
| cpu_weight | CPU scheduling weight of this resource group on a BE node. |
| exclusive_cpu_cores | CPU hard isolation parameter for this resource group. |
| mem_limit | Memory limit of the resource group. |
| big_query_cpu_second_limit | Big query upper time limit of the resource group. |
| big_query_scan_rows_limit | Big query scan row limit of the resource group. |
| big_query_mem_limit | Big query memory limit of the resource group. |
| concurrency_limit | Concurrency limit of the resource group. |
| type | Type of resource group. |
| spill_mem_limit_threshold | Memory usage threshold that triggers spilling to disk. |
| classifiers | Classifiers that are associated with the resource group. `id` is the ID of the classifier, and `weight` is the degree of matching. |

## Examples
Expand All @@ -50,13 +51,10 @@ Example 1: Shows all resource groups in the cluster.

```Plain
mysql> SHOW RESOURCE GROUPS ALL;
+-------+--------+----------------+-----------+----------------------------+---------------------------+---------------------+-------------------+--------+------------------------------------------------------------------------------------------------------------------+
| name | id | cpu_core_limit | mem_limit | big_query_cpu_second_limit | big_query_scan_rows_limit | big_query_mem_limit | concurrency_limit | type | classifiers |
+-------+--------+----------------+-----------+----------------------------+---------------------------+---------------------+-------------------+--------+------------------------------------------------------------------------------------------------------------------+
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625127, weight=4.459375, user=rg1_user1, role=rg1_role1, query_type in (SELECT), source_ip=172.26.xxx.xx/24) |
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625128, weight=3.459375, user=rg1_user2, query_type in (SELECT), source_ip=172.26.xxx.xx/24) |
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625129, weight=2.359375, user=rg1_user3, source_ip=172.26.xxx.xx/24) |
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625130, weight=1.0, user=rg1_user4) |
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625131, weight=10.0, db='db1') |
+-------+--------+----------------+-----------+----------------------------+---------------------------+---------------------+-------------------+--------+------------------------------------------------------------------------------------------------------------------+
+---------------+------+------------+---------------------+-----------+----------------------------+---------------------------+---------------------+-------------------+---------------------------+--------------------+
| name | id | cpu_weight | exclusive_cpu_cores | mem_limit | big_query_cpu_second_limit | big_query_scan_rows_limit | big_query_mem_limit | concurrency_limit | spill_mem_limit_threshold | classifiers |
+---------------+------+------------+---------------------+-----------+----------------------------+---------------------------+---------------------+-------------------+---------------------------+--------------------+
| default_mv_wg | 3 | 1 | 0 | 80.0% | 0 | 0 | 0 | null | 80% | (id=0, weight=0.0) |
| default_wg | 2 | 32 | 0 | 100.0% | 0 | 0 | 0 | null | 100% | (id=0, weight=0.0) |
+---------------+------+------------+---------------------+-----------+----------------------------+---------------------------+---------------------+-------------------+---------------------------+--------------------+
```
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ SHOW { RESOURCE GROUPS [ALL] | RESOURCE GROUP resource_group_name }
| -------------------------- | ------------------------------------------------------------ |
| name | 资源组名。 |
| id | 资源组 ID。 |
| cpu_core_limit | 资源组 CPU 核数上限。 |
| cpu_weight | 该资源组在一个 BE 节点上调度 CPU 的权重。 |
| exclusive_cpu_cores | 该资源组的 CPU 硬隔离参数。 |
| mem_limit | 资源组内存资源上限。 |
| big_query_cpu_second_limit | 大查询任务可以使用 CPU 的时间上限。 |
| big_query_scan_rows_limit | 大查询任务可以扫描的行数上限。 |
| big_query_mem_limit | 大查询任务可以使用的内存上限。 |
| concurrency_limit | 资源组中并发查询数的上限。 |
| type | 资源组类型。 |
| spill_mem_limit_threshold | 该资源组触发落盘的内存占用阈值。 |
| classifiers | 资源组关联的分类器信息。其中,`id` 为分类器 ID,`weight` 为分类器匹配度。 |

## 示例
Expand All @@ -44,13 +45,10 @@ SHOW { RESOURCE GROUPS [ALL] | RESOURCE GROUP resource_group_name }

```Plain
mysql> SHOW RESOURCE GROUPS ALL;
+-------+--------+----------------+-----------+----------------------------+---------------------------+---------------------+-------------------+--------+------------------------------------------------------------------------------------------------------------------+
| name | id | cpu_core_limit | mem_limit | big_query_cpu_second_limit | big_query_scan_rows_limit | big_query_mem_limit | concurrency_limit | type | classifiers |
+-------+--------+----------------+-----------+----------------------------+---------------------------+---------------------+-------------------+--------+------------------------------------------------------------------------------------------------------------------+
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625127, weight=4.459375, user=rg1_user1, role=rg1_role1, query_type in (SELECT), source_ip=172.26.xxx.xx/24) |
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625128, weight=3.459375, user=rg1_user2, query_type in (SELECT), source_ip=172.26.xxx.xx/24) |
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625129, weight=2.359375, user=rg1_user3, source_ip=172.26.xxx.xx/24) |
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625130, weight=1.0, user=rg1_user4) |
| rg1 | 625126 | 10 | 20.0% | 100 | 100000 | 1073741824 | null | NORMAL | (id=625131, weight=10.0, db='db1') |
+-------+--------+----------------+-----------+----------------------------+---------------------------+---------------------+-------------------+--------+------------------------------------------------------------------------------------------------------------------+
+---------------+------+------------+---------------------+-----------+----------------------------+---------------------------+---------------------+-------------------+---------------------------+--------------------+
| name | id | cpu_weight | exclusive_cpu_cores | mem_limit | big_query_cpu_second_limit | big_query_scan_rows_limit | big_query_mem_limit | concurrency_limit | spill_mem_limit_threshold | classifiers |
+---------------+------+------------+---------------------+-----------+----------------------------+---------------------------+---------------------+-------------------+---------------------------+--------------------+
| default_mv_wg | 3 | 1 | 0 | 80.0% | 0 | 0 | 0 | null | 80% | (id=0, weight=0.0) |
| default_wg | 2 | 32 | 0 | 100.0% | 0 | 0 | 0 | null | 100% | (id=0, weight=0.0) |
+---------------+------+------------+---------------------+-----------+----------------------------+---------------------------+---------------------+-------------------+---------------------------+--------------------+
```

0 comments on commit da8cd87

Please sign in to comment.