Note
This view is available starting with V4.3.4.
Purpose
This view displays the configuration parameters of various resource types for all tenants in the Resource Manager.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID of the resource plan. |
| PLAN | varchar(128) | NO | The name of the resource plan to which the content of the resource plan belongs. |
| GROUP_OR_SUBPLAN | varchar(128) | NO | The name of the resource group whose resources are controlled by the resource plan content. |
| COMMENTS | varchar(2000) | YES | The comments corresponding to the resource plan content. |
| MGMT_P1 | bigint(20) | NO | Relative maximum CPU utilization, as a percentage, of available resources when the system is fully loaded. The default value is 100. |
| UTILIZATION_LIMIT | bigint(20) | NO | The maximum percentage of CPU resources that a tenant can consume in a resource group. The default value is 100, which means that a tenant can use all CPU resources. |
| MIN_IOPS | bigint(20) | NO | The IOPS resources reserved for the resource group in case of IO contention. The sum of the values of MIN_IOPS specified for all resource groups cannot exceed 100. The default value is 0. |
| MAX_IOPS | bigint(20) | NO | The maximum amount of I/O operations per second (IOPS) that can be used by the resource group. The sum of all specified MAX_IOPS values across resource groups can exceed 100. The default value is 100. |
| WEIGHT_IOPS | bigint(20) | NO | This column specifies the weight value of IOPS when I/O resource contention occurs. The total of all specified WEIGHT_IOPS across resource groups can exceed 100, provided that the MIN_IOPS and MAX_IOPS settings are met. I/O resources are allocated based on the normalized weights. The default value is 0. |
| MAX_NET_BANDWIDTH | bigint(20) | NO | The maximum network bandwidth of a resource group. The total of the MAX_NET_BANDWIDTH values of all resource groups can exceed 100. Default value: 100 |
| NET_BANDWIDTH_WEIGHT | bigint(20) | NO | The weight of bandwidth. In the case of network resource contention, the sum of the NET_BANDWIDTH_WEIGHT values specified for all resource groups can exceed 100. As long as the MAX_NET_BANDWIDTH setting is met, network bandwidth is allocated based on the normalized weight. Default value: 0. |
Sample query
In the Shared-Nothing (SN) mode, the sys tenant can query the resource configuration parameters for 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 priority | 100 | 100 | 10 | 90 | 30 | 100 | 0 |
+-----------+---------+-------------------+-----------+---------+-------------------+----------+----------+-------------+-------------------+----------------------+
4 rows in set
References
View the resource configuration parameters for the current tenant in the Resource Manager: DBA_OB_RSRC_DIRECTIVES
For more information about resource isolation, see the following topics: