12 Managing Database Resources
You can use the Oracle Database Resource Manager (Resource Manager) features in EM Express to manage database resources efficiently.
This chapter assumes that you are familiar with resource plan concepts and terminology. It focuses on how to manage resource plans using EM Express.
You can use EM Express to create and manage resource plans for non-multitenant container databases (non-CDBs), CDBs, and pluggable databases (PDBs).
This chapter contains the following sections:
See Also:
If you are not familiar with resource plan concepts and terminology, read the following information in addition to reading this chapter:
-
Oracle Database Administrator’s Guide for information on using Resource Manager for non-CDBs
-
Oracle Multitenant Administrator's Guide for information on using Resource Manager for CDBs and PDBs
12.1 About Resource Management
The Resource Manager features in EM Express enable you to manage multiple workloads within a database that are contending for system and database resources.
From the Resource Management page in EM Express for a non-CDB, CDB, or PDB, you can navigate to the Resource Manager features.
See Also:
-
Oracle Database Administrator’s Guide for information on using Resource Manager for non-CDBs
-
Oracle Multitenant Administrator's Guide for information on using Resource Manager for CDBs and PDBs
12.1.1 About Resource Manager Solutions for a Non-CDB
In a non-CDB, when database resource allocation decisions are left to the operating system, you may encounter problems with workload management.
These problems can include:
-
Excessive overhead:
Excessive overhead results from operating system context switching between Oracle Database server processes when the number of server processes is high.
-
Inefficient scheduling
The operating system deschedules database servers while they hold latches, which is inefficient.
-
Inappropriate allocation of resources
The operating system distributes resources equally among all active processes and cannot prioritize one task over another.
-
Inability to manage database-specific resources, such as parallel execution servers and active sessions
Using Resource Manager helps to overcome these problems by allowing the database more control over how hardware resources are allocated. In an environment with multiple concurrent user sessions that run jobs with differing priorities, all sessions should not be treated equally. The Resource Manager enables you to classify sessions into groups based on session attributes, and to then allocate resources to those groups in a way that optimizes hardware utilization for your application environment.
With the Resource Manager features in EM Express, you can:
-
Create resource consumer groups (consumer groups) that collect user sessions together into resource consumer groups (consumer groups) based on their processing needs.
-
Set CPU directives that distribute available CPU by allocating shares of CPU to different consumer groups. For example, in a data warehouse, a higher number of shares can be given to ROLAP (relational online analytical processing) applications than to batch jobs.
-
Set parallel server directives that limit the degree of parallelism of any operation performed by members of a consumer group.
-
Set parallel server directives that manage the order of parallel statements in the parallel statement queue. Parallel statements from a critical application can be enqueued ahead of parallel statements from a low priority group of users.
-
Set parallel server directives that limit the number of parallel execution servers that a group of users can use. This ensures that all the available parallel execution servers are not allocated to only one group of users.
-
Set runaway query directives that detect when a session or call consumes more than a specified amount of CPU, physical I/O, logical I/O, or elapsed time, and then automatically either terminate the session or call, or switch to a consumer group with a lower resource allocation or a limit on the percentage of CPU that the group can use. A logical I/O, also known as a buffer I/O, refers to reads and writes of buffers in the buffer cache. When a requested buffer is not found in memory, the database performs a physical I/O to copy the buffer from either disk or the flash cache into memory, and then a logical I/O to read the cached buffer.
See Also:
12.1.2 About Resource Manager Solutions for a CDB
Resource Manager can provide more efficient use of resources for a CDB.
When resource allocation decisions for a CDB are left to the operating system, you may encounter the following problems with workload management:
-
Inappropriate allocation of resources among PDBs
The operating system distributes resources equally among all active processes and cannot prioritize one task over another. Therefore, one or more PDBs might use an inordinate amount of the system resources, leaving the other PDBs starved for resources.
-
Inappropriate allocation of resources within a single PDB
One or more sessions connected to a single PDB might use an inordinate amount of the system resources, leaving other sessions connected to the same PDB starved for resources.
-
Inconsistent performance of PDBs
A single PDB might perform inconsistently when other PDBs are competing for more system resources or less system resources at various times.
-
Lack of resource usage data for PDBs
Resource usage data is critical for monitoring and tuning PDBs. It might be possible to use operating system monitoring tools to gather the resource usage data for a non-CDB if it is the only database running on the system. However, in a CDB, operating system monitoring tools are no longer as useful because there are multiple PDBs running on the system.
Resource Manager helps to overcome these problems by allowing the CDB more control over how hardware resources are allocated among the PDBs and within PDBs.
In a CDB with multiple PDBs, some PDBs typically are more important than others. The Resource Manager enables you to prioritize and limit the resource usage of specific PDBs.
With the Resource Manager, you can:
-
Specify that different PDBs should receive different shares of the system resources so that more resources are allocated to the more important PDBs
-
Limit the CPU usage of a particular PDB
-
Limit the number of parallel execution servers that a particular PDB can use
-
Limit the memory usage of a particular PDB
-
Specify the minimum amount of memory required by a particular PDB
-
Limit the resource usage of different sessions connected to a single PDB
-
Limit the I/O generated by specific PDBs
-
Monitor the resource usage of PDBs
12.1.3 About Consumer Groups
A resource consumer group (consumer group) is a collection of user sessions that are grouped together based on their processing needs. When a session is created, it is automatically mapped to a consumer group based on mapping rules that you set up.
Because the Resource Manager allocates resources (such as CPU) to consumer groups, when a session becomes a member of a consumer group, its resource allocation is determined by the allocation for the consumer group.
There are special consumer groups that are always present in the data dictionary. They cannot be modified or deleted. They are:
-
SYS_GROUP
This is the initial consumer group for all sessions created by user accounts
SYS
orSYSTEM
. This initial consumer group can be overridden by session-to–consumer group mapping rules. -
OTHER_GROUPS
This consumer group contains all sessions that have not been assigned to a consumer group. Every resource plan (plan) must contain a directive to
OTHER_GROUPS
.
There can be no more than 28 consumer groups in any active non-CDB plan, and there can be no more than eight consumer groups in any active PDB plan.
See Also:
-
Oracle Database Administrator’s Guide for more information about consumer groups.
12.1.4 About Plans
A resource plan (plan) is a container for plan directives (directives) that specify how to allocate resources.
In addition to the plans that are predefined for each Oracle database, you can create any number of plans.
You can create plans for non-CDBs, CDBs, and PDBs. However, in a particular non-CDB, CDB, or PDB, only one plan is active at a time. When a plan is active, each of its directives controls resource allocation.
In a non-CDB plan or PDB plan, the directives specify how to allocate resources to consumer groups in the non-CDB or PDB.
In a CDB plan, the directives specify how to allocate resources to the PDBs in the CDB.
12.1.5 About Directives
Resource plan directives (directives) specify how to allocate resources.
Directives in a non-CDB plan or PDB plan associate a consumer group with the plan and specify how resources are to be allocated to that consumer group. Resources are allocated to consumer groups according to the set of directives that belong to the plan. There is a parent-child relationship between a plan and its directives. Each directive references one consumer group, and no two directives for the plan can reference the same consumer group.
A directive in a non-CDB plan or PDB plan has several ways in which it can limit resource allocation for a consumer group. For example, it can control how much CPU the consumer group gets as a percentage of total CPU.
Resources are allocated to consumer groups according to the set of directives in a non-CDB plan or PDB plan. There is a parent-child relationship between a plan and its directives. Each directive references one consumer group, and no two directives for the same plan can reference the same consumer group.
Directives in a CDB plan specify how to allocate resources to the PDBs in the CDB. In a CDB plan, you can define directives explicitly for none, some, or all of the PDBs in a CDB. Each CDB plan also has a default directive for PDBs. When a CDB plan is the active plan, the default directive is used for any PDB that does not have directives explicitly defined for it.
The following table summarizes how the directives for different types of plans allocate resources:
Plan Type | Directives Allocate Resources To |
---|---|
Non-CDB plan |
Consumer groups |
CDB plan |
PDBs |
PDB plan |
Consumer groups |
See Also:
12.1.6 About Non-CDB Plans
A non-CDB plan includes directives that specify how to allocate resources to consumer groups in the non-CDB.
A non-CDB plan must include a directive that allocates resources to the consumer group named OTHER_GROUPS
. OTHER_GROUPS
applies to all sessions that do not have a mapping to any of the other consumer groups in the plan.
You can use the Quick Setup feature in EM Express to create a new non-CDB plan if your system has 8 or fewer services, users, and programs.
If your system has 9 or more services, users, and programs, you create an empty plan and then add directives to the plan.
See Also:
12.1.7 About Managing CDB and PDB Workloads
In a CDB, you can use the Resource Manager features in EM Express to manage multiple workloads within multiple PDBs competing for system and CDB resources.
In a CDB, you can manage resources on two basic levels:
-
CDB level: You can manage the workloads for multiple PDBs that are contending for system and CDB resources. You can specify how resources are allocated to PDBs, and you can limit the resource utilization of specific PDBs.
-
PDB level: You can manage the workloads within each PDB.
Resource Manager allocates the resources in two steps:
-
It allocates a portion of the system’s resources to each PDB.
-
In a specific PDB, it allocates a portion of the system resources allocated in Step 1 to each session connected to the PDB.
Note:
All activity in the root is automatically managed by Resource Manager.
See Also:
12.1.7.1 About CDB Plans
In a CDB, PDBs might have different levels of priority. You can create CDB plans to distribute resources to different PDBs in a CDB based on these priorities.
The set of directives in a CDB plan specify how to allocate resources to the PDBs in the CDB.
There is a parent-child relationship between a CDB plan and its directives.
Each directive references a single PDB.
The directives control allocation of the following resources to the PDBs:
-
CPU
-
Parallel execution servers
-
Memory
A directive can control the allocation of resources to PDBs based on the share value that you specify for each PDB. A higher share value results in more resources. For example, you can specify that one PDB is allocated double the resources allocated to a second PDB by setting the share value for the first PDB twice as high as the share value for the second PDB.
You can also specify utilization limits for PDBs The utilization limit limits resource allocation to the PDB. For example, it can control how much CPU a PDB gets as a percentage of the total CPU available to the CDB.
You can use both shares and utilization limits together for precise control over the resources allocated to each PDB in a CDB.
Note:
Oracle recommends that you do not use the parallel_server_limit
directive in a CDB resource plan.
See Also:
12.1.7.1.1 About Shares for Allocating Resources to PDBs
To allocate resources among PDBs, you assign a share value to each PDB in a CDB plan. A higher share value results in more guaranteed resources for a PDB.
For example, if your CDB has three PDBs, a CDB plan could specify share values for each of those three PDBs, as shown in Figure 12-1:
In this example, the total number of shares allocated is seven (3 plus 3 plus 1). The salespdb and the servicespdb PDB are each guaranteed 3/7th of the resources, while the hrpdb PDB is guaranteed 1/7th of the resources. However, any PDB can use more than the guaranteed amount of a resource if there is no resource contention.
If workloads of the PDBs consume all of the system resources, then:
-
The salespdb and servicespdb PDBs can consume the same amount of CPU resources. The salespdb and servicespdb PDBs are each guaranteed three times more CPU resource than the hrpdb PDB.
-
Queued parallel queries from the salespdb and servicespdb PDBs are selected equally. Queued parallel queries from the salespdb and servicespdb PDBs are selected three times as often as queued parallel queries from the hrpdb PDB.
-
The salespdb and servicespdb PDBs can consume the same amount of memory resources. The salespdb and servicespdb PDBs are each guaranteed three times more memory resource than the hrpdb PDB.
See Also:
12.1.7.1.2 About Utilization Limits for PDBs
A utilization limit restrains the system resource usage of a specific PDB. You can specify utilization limits for CPU, parallel execution servers, and memory.
Table 12-1 describes utilization limits for PDBs and the action taken when a PDB reaches a utilization limit.
Table 12-1 Utilization Limits for PDBs
Resource | Resource Utilization Limit | Resource Manager Action |
---|---|---|
CPU |
The sessions connected to a PDB reach the CPU utilization limit for the PDB. This utilization limit for CPU is set by the |
Resource Manager throttles the PDB sessions so that the CPU utilization for the PDB does not exceed the utilization limit. |
Parallel execution servers |
A PDB uses more than the value of the For example, if the |
Resource Manager queues parallel queries if the number of parallel execution servers used by the PDB would exceed the limit specified by the |
Memory |
The sessions connected to a PDB reach the memory limit for the PDB. This utilization limit for memory is set by the |
When the usage for a PDB exceeds the limit for the shared pool, Resource Manager frees the least recently used objects for that PDB before the cached objects of other PDBs, even if those have been in the cache longer. When the usage for a PDB exceeds the limit for the PGA, Resource Manager can interrupt queries or PL/SQL functions or kill sessions associated with any PDB, including PDBs that did not exceed the limit. |
A CDB plan could specify shares and utilization limits for three PDBs, as shown in Figure 12-2.
Figure 12-2 Shares and Utilization Limits in a CDB Plan
Description of "Figure 12-2 Shares and Utilization Limits in a CDB Plan"
Figure 12-2 shows that there are no utilization limits on the salespdb and servicespdb PDBs because the cpu_utilization_limit (%)
and parallel_server_limit (%)
directives are both set to 100 for them. However, the hrpdb PDB is limited to 70% of the applicable system resources because the cpu_utilization_limit (%)
and parallel_server_limit (%)
directives are both set to 70.
Note:
Oracle recommends that you do not use the parallel_server_limit
directive in a CDB resource plan.
See Also:
12.1.7.1.3 About the Default Directive for PDBs
When a CDB plan does not explicitly define a directive for a PDB, the default directive for the CDB plan is used to allocate resources to that PDB.
Table 12-2 shows the attributes of the initial default directive for PDBs.
Table 12-2 Initial Default Directive Attributes for PDBs
Directive Attribute | Value |
---|---|
shares |
1 |
cpu_utilization_limit (%) |
100 |
parallel_server_limit (%) |
100 |
memory_minimum (%) |
0 |
memory_limit (%) |
100 |
When a PDB is added to a CDB and no directive is defined for it, the PDB uses the default directive for PDBs.
You can define a directive for any new PDB.
When a PDB is unplugged from a CDB, the directive for the PDB is retained. If the same PDB is plugged back into the CDB, then it uses the directive defined for it if the directive was not deleted manually.
Figure 12-3 shows an example where the salespdb, servicespdb, and hrpdb PDBs each have a directive defined for them. However, the marketingpdb and testingpdb PDBs do not have a directive defined for them, so the default PDB directive is used for them.
Figure 12-3 Default Directive for a CDB Plan
Description of "Figure 12-3 Default Directive for a CDB Plan"
Figure 12-3 shows that the default PDB directive specifies that the share is 1, the cpu_utilization_limit is 100%, the parallel_server_limit is 100%, and the memory_limit is 100%.
Figure 12-3 also shows the PDBs marketingpdb and testingpdb using the default PDB directive, which means that marketingpdb and testingpdb each get 1 share and three utilization limits of 100%.
You can also change the default PDB directive attribute values, as described in Changing the Default PDB Directive for a CDB Plan. Any PDB added to the CDB after the default PDB directive is changed will use the new attribute values from the default PDB directive unless you define a PDB directive for the PDB.
Note:
Oracle recommends that you do not use the parallel_server_limit
directive in a CDB resource plan.
12.1.7.2 About PDB Plans
A CDB plan determines the amount of resources allocated to each PDB. A PDB plan determines how the resources allocated to a specific PDB are allocated to consumer groups within that PDB.
A PDB plan is similar to a plan for a non-CDB. In the same way that a plan for a non-CDB allocates resources among the consumer groups in the non-CDB, a PDB plan allocates resources among the consumer groups in a PDB.
A PDB plan must include a directive that allocates resources to the consumer group named OTHER_GROUPS
. OTHER_GROUPS
applies to all sessions that do not have a mapping to any of the other consumer groups in the plan.
When you create one or more PDB plans, the CDB plan for the PDB's CDB should meet certain requirements. Table 12-3 describes the requirements for the CDB plan and the results when the requirements are not met.
When you create one or more PDB plans and there is no CDB plan, the CDB uses the DEFAULT_CDB_PLAN
that is supplied with Oracle Database.
Table 12-3 CDB Plan Requirements for PDB Plans
Resource | CDB Plan Requirements | Results When Requirements Are Not Met |
---|---|---|
CPU |
One of the following requirements must be met:
These values can be set in a directive for the specific PDB or in a default directive. |
The CPU allocation policy of the PDB plan is not enforced. The CPU limit specified by the |
Parallel execution servers |
One of the following requirements must be met:
These values can be set in a directive for the specific PDB or in a default directive. |
The parallel execution server allocation policy of the PDB plan is not enforced. The parallel server limit specified by the |
Memory |
One of the following requirements must be met:
These values can be set in a directive for the specific PDB or in a default directive. |
The memory allocation policy of the PDB plan is not enforced. The memory limit specified by the |
Figure 12-4 shows an example of a CDB plan and a PDB plan.
Note:
Oracle recommends that you do not use the parallel_server_limit
directive in a CDB resource plan.
You can use the Quick Setup feature in EM Express to create a new PDB plan if your system has fewer than 8 services, fewer than 8 users, or fewer than 8 programs.
If your system has 8 or more services, 8 or more users, or 8 or more programs, you create an empty plan and then add directives to the plan.
See Also:
12.1.8 Accessing the Resource Management Page
From the Resource Management page in EM Express, you can navigate to the resource management features that are available in EM Express.
The content of the Resource Management page is specific to the type of database (non-CDB, CDB, or PDB) and whether a plan is active for the database or not. See the following tables for more information:
-
Table 12-4 shows the contents of the Resource Management page for a non-CDB when no plan is active.
-
Table 12-5 shows the contents of the Resource Management page for a non-CDB when a plan is active.
-
Table 12-6 shows the contents of the Resource Management page for the root of a CDB when no plan is active.
-
Table 12-7 shows the contents of the Resource Management page for the root of a CDB when a plan is active.
-
Table 12-8 shows the contents of the Resource Management page for a PDB when no plan is active.
-
Table 12-9 shows the contents of the Resource Management page for a PDB when a plan is active.
Note:
The data on Resource Manager dashboard charts on the Resource Management page comes from Automatic Workload Repository (AWR). If no AWR data has been collected when you access the Resource Management page, the charts do not display any data, and the informational message “No AWR Data Available” is displayed.
By default, AWR data is collected on a 1 hour interval, so it becomes available one hour after the database is started for the first time.
Table 12-4 shows the content of the Resource Management page for a non-CDB when no plan is active:
Table 12-4 Resource Management Page for a Non-CDB When No Plan is Active
Item | Description |
---|---|
General section |
Provides general information about the database. |
Host CPU chart |
This chart shows the amount of CPU used on this host by the database instance and by other host processes. For an Oracle RAC database, the chart shows the cumulative CPU used by all database instances. Use this chart for guidance on setting a limit for instance caging. For an Oracle RAC database, instance caging can also be enabled for all instances. |
CPU Activity by Services chart |
This chart shows the amount of CPU used on this host by the database instance and by other host processes. For an Oracle RAC database, the chart shows the cumulative CPU used by all database instances. Use this chart for guidance on setting a limit for instance caging. For an Oracle RAC database, instance caging can also be enabled for all instances. |
SQL Execution Statistics chart |
This chart shows the amount of CPU used on this host by the database instance and by other host processes. For an Oracle RAC database, the chart shows the cumulative CPU used by all database instances. Use this chart for guidance on setting a limit for instance caging. For an Oracle RAC database, instance caging can also be enabled for all instances. |
Parallel and Serial Active Sessions chart |
This chart shows the amount of CPU used on this host by the database instance and by other host processes. For an Oracle RAC database, the chart shows the cumulative CPU used by all database instances. Use this chart for guidance on setting a limit for instance caging. For an Oracle RAC database, instance caging can also be enabled for all instances. |
Parallel Operations Downgraded chart |
This chart shows the amount of CPU used on this host by the database instance and by other host processes. For an Oracle RAC database, the chart shows the cumulative CPU used by all database instances. Use this chart for guidance on setting a limit for instance caging. For an Oracle RAC database, instance caging can also be enabled for all instances. |
Table 12-5 shows the content of the Resource Management page for a non-CDB when a plan is active:
Table 12-5 Resource Management page for a Non-CDB When a Plan is Active
Item | Description |
---|---|
General section |
Provides general information about the database and the resource plan. |
Host CPU chart |
This chart shows the amount of CPU used on this host by the database instance and by other host processes. For an Oracle RAC database, the chart shows the cumulative CPU used by all database instances. Use this chart for guidance on setting a limit for instance caging. For an Oracle RAC database, instance caging can also be enabled for all instances. |
CPU Utilization chart |
This chart shows the amount of CPU used by the top consumer groups in the currently active resource manager plan. Use this chart to determine if CPU resource limits for the consumer groups are effective. |
Waiting Sessions chart |
This chart shows the number of waiting sessions for the top consumer groups in the currently active resource manager plan. Use this chart to determine if the resource limits set for the consumer groups are adequate or if they are causing sessions to be in the waiting state. |
SQL Executions region |
This region shows the following two charts:
|
Parallel Executions region |
These two charts show the number of parallel servers and parallel SQL statements that were queued by Database Resource Manager for the top consumer groups. You can use these charts to determine if the parallel server directives in a resource manager plan are effective. |
Table 12-6 shows the content of the Resource Management page for the root of a CDB when no plan is active:
Table 12-6 Resource Management Page for the Root of a CDB When No Plan is Active
Item | Description |
---|---|
General section |
Provides general information about the database. |
Host CPU chart |
This chart shows the amount of CPU used on this host by the database instance and by other host processes. For an Oracle RAC database, the chart shows the cumulative CPU used by all database instances. Use this chart for guidance on setting a limit for instance caging. For an Oracle RAC database, instance caging can also be enabled for all instances. |
CPU Utilization by PDBs chart |
This chart shows the amount of CPU used by the top PDBs. Use this chart to determine the appropriate CPU resource limits for the PDBs in a resource manager plan. |
Memory chart |
Use this chart to determine the top PDBs that consume the most memory. Use this chart to determine the memory limits for the PDBs. |
Active Parallel Servers chart |
Use this chart with the Parallel Operations Downgraded chart to set parallel server directives for the PDBs in a resource manager plan. |
Parallel Operations Downgraded chart |
This chart shows the number of parallel operations downgraded or serialized. Use this chart with the Active Parallel Servers chart to set parallel server directives for the PDBs in a resource manager plan. |
Table 12-7 shows the content of the Resource Management page for the root of a CDB when a plan is active:
Table 12-7 Resource Management Page for the Root of a CDB When a Plan is Active
Item | Description |
---|---|
General section |
Provides general information about the database and the resource plan. |
Host CPU chart |
This chart shows the amount of CPU used on this host by the database instance and by other host processes. For an Oracle RAC database, the chart shows the cumulative CPU used by all database instances. Use this chart for guidance on setting a limit for instance caging. For an Oracle RAC database, instance caging can also be enabled for all instances. |
CPU Utilization chart |
This chart shows the amount of CPU used by the top PDBs in the currently active resource manager plan. Use this chart to determine if CPU resource limits for the PDBs are effective. |
Memory Used chart |
Use this chart to determine the top PDBs that consume the most memory in the currently active resource manager plan. |
SQL Executions region |
This region shows the following two charts:
|
Parallel Executions region |
These two charts show the number of parallel servers and parallel SQL statements that were queued by Database Resource Manager for the top PDBs. Use these charts to determine if the parallel server directives in a resource manager plan are effective. |
Table 12-8 shows the Resource Management page for a PDB when no plan is active:
Table 12-8 Resource Management Page for a PDB When No Plan is Active
Item | Description |
---|---|
General section |
Provides general information about the database. |
CPU Activity by Services chart |
This chart shows CPU utilization for the top database services running on this instance. If a consumer group is created by mapping it to a database service, this chart gives guidance on how to set CPU resource limits for that consumer group. |
SQL Execution Statistics chart |
This chart shows the maximum values of certain SQL execution statistics for which runaway query directives can be set in a resource manager plan. These values can be used to obtain guidance while setting directives for runaway queries. |
Memory chart |
Use this chart to determine the top consumer groups that consume the most memory in the currently active plan. |
Parallel and Serial Active Sessions chart |
Use this chart with the Parallel Operations Downgraded chart to set parallel server directives in a resource manager plan. |
Parallel Operations Downgraded chart |
This chart shows the number of parallel operations downgraded or serialized. Use this chart with the Active Parallel Servers chart to set parallel server directives in a resource manager plan. |
Table 12-9 shows the Resource Management page for a PDB when a plan is active:
Table 12-9 Resource Management Page for a PDB When a Plan is Active
Item | Description |
---|---|
General section |
Provides general information about the database and the resource plan. |
CPU Utilization chart |
This chart shows the amount of CPU used by the top consumer groups in the currently active resource manager plan. Use this chart to determine if CPU resource limits for the consumer groups are effective. |
Waiting Sessions chart |
This chart shows the number of waiting sessions for the top consumer groups in the currently active resource manager plan. Use this chart to determine if the resource limits set for the consumer groups are adequate or if they are causing sessions to be in the waiting state. |
SQL Executions chart |
This chart shows the maximum values of certain SQL execution statistics for which runaway query directives can be set in a resource manager plan. These values can be used to obtain guidance while setting directives for runaway queries. |
Runaway Query Violations chart |
This chart shows the number of violations caused by runaway queries per consumer group in the currently active resource manager plan. This can provide guidance while setting directives for runaway queries. |
Parallel Executions region |
These two charts show the number of parallel servers and parallel SQL statements that were queued by Database Resource Manager for the top consumer groups. Use these charts to determine if the parallel server directives in a resource manager plan are effective. |
12.2 Managing Plans
This section provides information about managing resource plans (plans) using EM Express.
It includes the following topics:
12.2.1 Creating Plans
You can create resource plans (plans) using the EM Express. Plans are created on the Resource Management: All Plans page.
You can use Quick Setup to create a new PDB plan if your system has fewer than 8 services, fewer than 8 users, or fewer than 8 programs.
If your system has 8 or more services, 8 or more users, or 8 or more programs, you create an empty plan and then add directives to the plan.
12.2.1.1 Creating a New Plan using Quick Setup
You can use the Quick Setup feature in EM Express to create a new resource plan for a non-CDB or PDB if your system has fewer than 8 services, fewer than 8 users, or fewer than 8 programs.
See Also:
12.2.1.2 Creating a New Plan
You can use EM Express to create a new resource plan (plan).
12.2.2 Viewing Plans
You can use EM Express to view all the resource plans (plans) for a database, or to view a single plan for a database.
See Also:
12.2.2.1 Viewing All the Plans
You can use EM Express to view all the resource plans (plans) for a database.
See Also:
12.2.3 Modifying a Plan
You can use EM Express to modify a resource plan (plan).
The following topics provide more information about different ways that you can modify a plan:
-
"Setting Parallel Server Directives for a Consumer Group in a Plan"
-
"Setting Runaway Query Directives for a Consumer Group in a Plan"
See Also:
12.2.3.1 Adding a New Consumer Group to a Plan
You can use EM Express to add a new consumer group to a non-CDB plan or PDB plan.
12.2.3.2 Adding an Existing Consumer Group to a Plan
You can use EM Express to add an existing consumer group to a non-CDB plan or PDB plan.
12.2.3.3 Removing a Consumer Group from a Plan
You can use EM Express to remove a consumer group from a non-CDB plan or a PDB plan.
12.2.3.4 Setting a Comment for a Consumer Group in a Plan
You can use EM Express to set a comment for a consumer group in a non-CDB plan or PDB plan.
See Also:
12.2.3.5 Setting Mapping Rules for a Consumer Group
You can use EM Express to set mapping rules for a consumer group.
See Also:
-
Oracle Database Administrator’s Guide for more information about mapping rules.
12.2.3.6 Setting Mapping Rule Priorities for Consumer Groups
You can use EM Express to set mapping rule priorities for consumer groups.
See Also:
12.2.3.7 Setting CPU Directives for a Consumer Group in a Plan
You can use EM Express to set CPU directives for a consumer group in a non-CDB plan or PDB plan.
See Also:
12.2.3.8 Setting Parallel Server Directives for a Consumer Group in a Plan
You can use EM Express to set parallel server directives for a consumer group in a non-CDB plan or PDB plan.
See Also:
12.2.3.9 Setting Runaway Query Directives for a Consumer Group in a Plan
You can use EM Express to set runaway query directives for a consumer group in a non-CDB plan or PDB plan.
See Also:
12.2.3.10 Setting Session Directives for a Consumer Group in a Plan
You can use EM Express to set session directives for a consumer group in a non-CDB plan or PDB plan.
See Also:
12.2.3.11 Setting a Plan as the Currently Active Plan
You can use EM Express to set a resource plan as the currently active plan.
See Also:
12.2.3.12 Changing the Default PDB Directive for a CDB Plan
You can use EM Express to change the default PDB directive for a CDB plan.
See Also:
12.2.3.13 Changing Directives for a PDB in a CDB Plan
You can use EM Express to change the directives for a PDB in a CDB plan.
See Also:
12.2.3.14 Setting a Comment for a PDB Directive in a CDB Plan
You can use EM Express to set a comment for a PDB directive in a CDB plan.
12.3 Managing Multiple Database Instances on a Single Server
Oracle Database provides a method for managing CPU allocations on a multi-CPU server running multiple Oracle Database instances.
This method is called instance caging. Instance caging and the Resource Manager features in EM Express work together to support desired levels of service across multiple instances.
See Also:
12.3.1 About Instance Caging
You can use instance caging to use hardware resources more efficiently when multiple Oracle database instances are running on a single multi-CPU server.
A typical reason to set instance caging would be server consolidation—using available hardware resources more efficiently. When running multiple instances on a single server, the instances compete for CPU. One resource-intensive database instance could significantly degrade the performance of the other instances. For example, on a 16-CPU system with four database instances, the operating system might be running one database instance on the majority of the CPUs during a period of heavy load for that instance. This could degrade performance in the other three instances.
A simple way to limit CPU consumption for each database instance is to use instance caging. Instance caging is a method that uses an initialization parameter to limit the number of CPUs that an instance can use simultaneously.
In the previous example, if you use instance caging to limit the number of CPUs to four for each of the four instances, there is less likelihood that one instance can interfere with the others. When constrained to four CPUs, an instance might become CPU-bound. This is when the Resource Manager begins to do its work to allocate CPU among the various database sessions according to the resource plan that you set for the instance. Thus, instance caging and the Resource Manager together provide a simple, effective way to manage multiple instances on a single server.
See Also:
-
Oracle Database Administrator’s Guide for more information about instance caging.
12.4 Managing Database Resources: Oracle by Example Series
Oracle By Example (OBE) has a series on the Oracle Database 2 Day DBA guide. This OBE series steps you through the tasks in this section, and includes annotated screenshots.
-
Access the Resource Management Page
-
Create and View Resource Plans
-
Modify a Resource Plan
-
To see a clickable list of the above tutorials, go to Manage Database Resources Series.
-
For seamless navigation through the tutorial series, access the following link:
You can navigate across the tutorials by clicking the > button at the bottom of the pane.