GC Resource Manager
Official documentation: administrator's Guide-> 24 Using the Database Resource Manager
Usage: less used in the actual production environment
Purpose: restrict the use of database resources, CPU memory undo tablespace I/O session
Occasion: when multiple applications use one database and the resources are insufficient, you can use the "Resource Manager" for adjustment.
Implementation: GC is available or EM is available, and the package can also be used
UI: simple, fast, and error-prone
Commend mode: complex configuration, long command, high failure rate, DBMS_RESOURCE_MANAGER_PRIVS Package Processing
Requirements:
1. Define two resource consumption groups (OLTP transaction processing resource consumption group and DSS Data Warehouse resource consumption group)
2. Create a schedule
3. For OLTP resource consumption groups, we cannot have more than 50 active sessions. If we have more than 50 active sessions, we should stop the system for 120 seconds and then request
4. For DSS resource consumption groups, we cannot exceed 10 active sessions at most. If more than 10 active sessions exist, we should stop the system for 300 seconds and then request
5. Set the CPU hit rate of three oltp dss OTHER_GROUPS groups to 50%, 30%, and 20%, respectively.
6. The maximum concurrency of DSS resource consumption groups is 20.
7. The time for querying a DML statement for An OLTP session cannot exceed 100 seconds
8. Specify the default "schedule" for the instance to activate
Lab
Statement: OLTP transaction processing resource consumption group
DSS Data Warehouse resource consumption group
OTHER_GROUPS other resource consumption groups
Different resource consumption group policies
Log on to the GC and enter the sysman password oracle1216.
Ocm01-> Administration-> consumer group-> enter the sys password to log on to the system.
Create-> OLTP resource consumption group, click Add to Add ocm01 users, select the check box, and click OK.
Create-> DSS resource consumption group, click Add to Add ocm0102 users, select the check box, and click OK.
Database Instance: ocmdb> Object Type: Resource Plan-> create-> Start A Plan Name schedule_plan
Click Modify to add Consumer Groups (OLTP and DSS)
LEO1-> Administration-> Plans create a schedule
Session Pool 10 300
50 120
In General options, level 30 50 20
Set the DSS degree of Parallelism to 20 in the Parallelism option.
In the Idle Time option, set "Max Idle Time" to restrict the OLTP session to query a DML statement for a maximum of 100 seconds.
Select "activate this plan" in General and activate the application. Click OK to complete the creation.
Summary from ocm experiment Selection
[Logon to gc]
Click targets]
[Click Databases-> ocmdb]
[Click administration> Resource Manager> Consumer Groups]
Enter the SYS user name and password]
Click Create to add a resource user group]
[Add DSS and OLTP resource user groups]
[Add a user to a resource user group]
[Tick and click Select]
Click OK]
[Click "Resource Manager"> "Plans" to add a scheduler]
Click Create to add a scheduler]
[Add plan]
-- =
None
Plan: SCHEDULE_PLAN
Description: SCHEDULE_PLAN
Check the second option
-- =
[Select resource user group for the plan]
[Set the CPU hit rate of three oltp dss OTHER_GROUPS groups to 50%, 30% and 20%, respectively]
Click Edit]
[Maximum concurrency of DSS resource consumption groups is 20]
[Query a DML statement for An OLTP session for no more than 100 seconds]
Click General-> Activate this plan to Activate the plan]
Click apply]
[Done]