Elements of resource manager in Oracle 11g

Source: Internet
Author: User

Resource Manager consists of the following elements:

Component

Description

Resource consumer group resource consumption group

Resources are allocated to a group of sessions. Resource Manager allocates resources to resource consumption groups instead of individual sessions.

Resource plan

Resource execution plan

A command container indicating the consumer group the resource is allocated. You specify how the database allocates resources by activating a specific resource plan.

Resource plan Directive

Associate a resource consumption group with a specific plan to specify how resources are allocated to that resource consumption group.

 

You use the dbms_resource_manager PL/SQL package to create and maintain these elements. These elements are stored in the data dictionary. You can view their information in the data dictionary view.

 

1. About resourceconsumer groups about resource consumption groups

A resource consumption group is a collection of user sessions that are combined according to their processing needs. When a session is created, it is automatically mapped to a resource consumption group based on the ing rules we set. As a Database Administrator (DBA), you can manually switch a session to another resource consumption group. Similarly, an applicationProgramYou can run a PL/SQL package program to switch its sessions to a specific resource consumption group. Because only when a session becomes a member of the resource consumption group, the resource manager allocates resources (such as CPU) to the resource consumption group ), its resource configuration is determined by the allocation of resource consumption groups. The Data Dictionary defines special resource consumption groups. They cannot be modified or deleted. These special resource consumption groups are:

    • Sys_group

This is the initial resource consumption group created by the user SYS or system for all sessions. The initial resource consumption group can be overwritten by the ing rule of the session resource consumption group.

    • The resource consumption group other_groups contains all sessions not allocated to a resource consumption group. Each resource plan must contain an instruction to other_groups.

2. About resource plandirectives resource plan instruction

Resource Manager allocates resources to resource consumption groups based on the resource plan instruction (Instruction) of the currently active resource plan group. There is a parent-child relationship between the resource plan and the resource plan instruction set. Each Command references a resource consumption group. The two commands of the active plan cannot reference the same consumer group.

A command has several methods to restrict resource consumption group resource allocation. For example, it can control the number of CPUs in the resource consumption group as a percentage of the total CPU. It can limit the total number of sessions active in the resource consumption group.

3. About resource plans resource plan

In addition to predefined resource plans for each Oracle database, we can also create any number of resource plans. However, only one resource plan is active at a time point. When a resource plan is active, each sub-resource plan instruction controls the allocation of resources in different resource consumption groups. Each plan must contain an instruction named other_group resource consumption to allocate resources. other_groups applies to all sessions that do not belong to the resource consumption group of the current activity plan.

 

Note:Although the term "Resource Plan" (or "Plan") represents an element of ResourceManager. It also refers to a complete resource plan model, including the resource plan element itself, its resource plan instruction, and the resource consumption group referenced by the instruction ,. For example, if this chapter refers to a daytime resource plan, it may be the element name of the resource plan, or the specific daytime resource allocation mode defined by the daytime resource plan and command. Therefore, for simplicity, we can say that "the daytime Plan supports interactive applications on batch processing applications ."

 

For example, a simpleresource plan is a simple resource plan.

Figure 27-1 shows a simple online business transaction processing (OLTP) application and reporting the application to organize resource planning during the day. CPU resources are allocated to three resource consumption groups during the day. Specifically, the OLTP allocates 75% of the CPU time, the report is allocated 15%, and the other_groups receives the remaining 10%.

 

The database provides a program (creating a simple plan) that allows you to quickly create a simple resource plan.

Note: The allocation is not performed until the CPU usage is 100%. If the CPU usage is lower than 100%, the database is not bound to the CPU, so you do not need to force the allocation to ensure that all sessions get their specified allocated resources. In addition, when the allocation is executed, resources that are not used by any resource consumption group can be used for other resource consumption groups. In the previous example, if the OLTP group does not use all of its allocated resources, Resource Manager allows the reports group or the other_groups group to use unused allocations.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.