The CREATE_PLAN_DIRECTIVE procedure is used to create a resource plan directive.
Syntax
DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (
PLAN VARCHAR(65535),
GROUP_OR_SUBPLAN VARCHAR(65535),
COMMENT VARCHAR(65535) DEFAULT '',
MGMT_P1 INT DEFAULT 100,
UTILIZATION_LIMIT INT DEFAULT 100,
MIN_IOPS INT DEFAULT 0,
MAX_IOPS INT DEFAULT 100,
WEIGHT_IOPS INT DEFAULT 0,
MAX_NET_BANDWIDTH INT DEFAULT 100,
NET_BANDWIDTH_WEIGHT INT DEFAULT 0);
Parameters
| Parameter | Description |
|---|---|
| PLAN | The name of the resource plan. |
| GROUP_OR_SUBPLAN | The name of the resource group or subplan. |
| COMMENT | The comment for the plan directive. |
| MGMT_P1 | Specifies the maximum CPU utilization percentage relative to availability when the system is under heavy load. |
| UTILIZATION_LIMIT | The upper limit of CPU resource utilization. The value of this parameter ranges from [0, 100]. 100 indicates that the tenant can use up to 100% of the CPU resources. If the value is 20, the tenant can use up to 20% of the CPU resources. |
| MIN_IOPS | The reserved IOPS resources during I/O contention. The sum of MIN_IOPS across all resource groups cannot exceed 100. The default value is 0. |
| MAX_IOPS | The upper limit of IOPS resources. The sum of MAX_IOPS across all resource groups can exceed 100. The default value is 100. |
| WEIGHT_IOPS | The IOPS resource weight during I/O contention. The sum of WEIGHT_IOPS across all resource groups can exceed 100 and will be normalized. The default value is 0. |
| MAX_NET_BANDWIDTH | The maximum network bandwidth resources that can be used. The total can exceed 100. The default value is 100. |
| NET_BANDWIDTH_WEIGHT | The weight value for network bandwidth. The total can exceed 100 and will be divided proportionally. The default value is 0. |
Examples
Bind the resource group
group1to the resource planDAYand specify the CPU resource plan directive for the resource group.obclient> CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE( PLAN=>'DAY', GROUP_OR_SUBPLAN=>'group1', mgmt_p1=>80, utilization_limit=>100);Bind the resource group
interactive_groupto the resource plandaytimeand specify the CPU, IOPS, and network bandwidth resource plan directives for the resource group.obclient> CALL DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE( PLAN => 'daytime', GROUP_OR_SUBPLAN => 'interactive_group' , MGMT_P1 => 30, UTILIZATION_LIMIT =>80, MIN_IOPS => 30, MAX_IOPS => 90, WEIGHT_IOPS => 80, MAX_NET_BANDWIDTH => 50, NET_BANDWIDTH_WEIGHT => 50);
References
For more information about resource isolation configuration, see Configure resource isolation within a tenant.