Note
This view was introduced in OceanBase Database V4.3.4.
Purpose
This view displays the resource configuration parameters of all tenants in the Resource Manager.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant to which the resource plan belongs. |
| PLAN | varchar(128) | NO | The name of the resource plan to which the resource plan content belongs. |
| GROUP_OR_SUBPLAN | varchar(128) | NO | The name of the resource group controlled by the resource plan content. |
| COMMENTS | varchar(2000) | YES | The comments on the resource plan content. |
| MGMT_P1 | bigint(20) | NO | The maximum percentage of CPU resources that can be used when the system is fully loaded. The default value is 100. |
| UTILIZATION_LIMIT | bigint(20) | NO | The maximum percentage of CPU resources that can be used by the resource group from the total CPU resources of the tenant. The default value is 100, indicating that the resource group can use all the CPU resources of the tenant. |
| MIN_IOPS | bigint(20) | NO | The number of IOPS reserved for the resource group when I/O contention occurs. The total value of MIN_IOPS specified for all resource groups cannot exceed 100. The default value is 0. |
| MAX_IOPS | bigint(20) | NO | The maximum number of IOPS that the resource group can use. The total value of MAX_IOPS specified for all resource groups can exceed 100. The default value is 100. |
| WEIGHT_IOPS | bigint(20) | NO | The weight value of IOPS when I/O contention occurs. The total value of WEIGHT_IOPS specified for all resource groups can exceed 100. If MIN_IOPS and MAX_IOPS are set, I/O resources are allocated based on the normalized weight value. The default value is 0. |
| MAX_NET_BANDWIDTH | bigint(20) | NO | The maximum network bandwidth that the resource group can use. The total value of MAX_NET_BANDWIDTH specified for all resource groups can exceed 100. The default value is 100. |
| NET_BANDWIDTH_WEIGHT | bigint(20) | NO | The weight value of network bandwidth when network resource contention occurs. The total value of NET_BANDWIDTH_WEIGHT specified for all resource groups can exceed 100. If MAX_NET_BANDWIDTH is set, network bandwidth resources are allocated based on the normalized weight value. The default value is 0. |
Sample query
In SN (shared-nothing) mode, the sys tenant queries the resource configuration parameters of all tenants in the Resource Manager.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_RSRC_DIRECTIVES;
The query result is as follows:
+-----------+---------+-------------------+-----------+---------+-------------------+----------+----------+-------------+-------------------+----------------------+
| TENANT_ID | PLAN | GROUP_OR_SUBPLAN | COMMENTS | MGMT_P1 | UTILIZATION_LIMIT | MIN_IOPS | MAX_IOPS | WEIGHT_IOPS | MAX_NET_BANDWIDTH | NET_BANDWIDTH_WEIGHT |
+-----------+---------+-------------------+-----------+---------+-------------------+----------+----------+-------------+-------------------+----------------------+
| 1002 | daytime | batch_group | | 100 | 40 | 40 | 80 | 70 | 100 | 0 |
| 1002 | daytime | interactive_group | new | 40 | 60 | 40 | 80 | 70 | 30 | 30 |
| 1004 | PLAN_A | BIG_GROUP | new | 40 | 60 | 20 | 100 | 10 | 60 | 60 |
| 1004 | PLAN_A | SMALL_GROUP | AP first | 100 | 100 | 10 | 90 | 30 | 100 | 0 |
+-----------+---------+-------------------+-----------+---------+-------------------+----------+----------+-------------+-------------------+----------------------+
4 rows in set