10.07.2015 Views

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 7 RESOURCE MANAGEMENTDBA_USERS: This view is not actually a Resource Manager view but it does displaythe username and initial resource group assignment, in itsINITIAL_RSRC_CONSUMER_GROUP field.DBA_HIST_RSRC_CONSUMER_GROUP: This view displays historical performancemetrics for Resource consumer groups. It contains AWR snapshots of theV$RSRC_CONS_GROUP_HISTORY view.DBA_HIST_RSRC_PLAN: This is a simple view that displays historical informationabout resource plans such as when they were activated and deactivated.The Wait Event: resmgr: cpu quantumDBRM allocates CPU resources by maintaining an execution queue similar to the way the operatingsystem’s scheduler queues processes for their turn on the CPU. The time a session spends waiting in thisexecution queue is assigned the wait event resmgr: cpu quantum. A CPU quantum is the unit of CPUtime (fraction of CPU) that Resource Manager uses for allocating CPU to consumer groups. This eventoccurs when Resource Manager is enabled and is actively throttling CPU consumption. Increasing theCPU allocation for a session’s consumer group will reduce the occurrence of this wait event and increasethe amount of CPU time allocated to all sessions in that group. For example, the CPU quantum waitevents may be reduced for the APPS resource group (currently 70% at level 1) by increasing the group’sCPU allocation to 80%.DBRM ExampleNow that we’ve discussed the key components of DBRM and how it works, let’s take a look at anexample of creating and utilizing resource plans. In this example we’ll create two resource plans similarto the one in Figure 7-1. One allocates CPU resources suitably for critical DAYTIME processing, and theother favors night-time processing.Step 1: Create Resource GroupsThe first thing we’ll do is create the resource groups for our plan. The following listing creates threeresource groups, APPS, REPORTS, and MAINTENANCE. Once we have the resource groups created, we’ll beable to map user sessions to them.BEGINdbms_resource_manager.clear_pending_area();dbms_resource_manager.create_pending_area();dbms_resource_manager.create_consumer_group(consumer_group => 'APPS',comment => 'Consumer group for critical OLTP applications');dbms_resource_manager.create_consumer_group(consumer_group => 'REPORTS',comment => 'Consumer group for long-running reports');dbms_resource_manager.create_consumer_group(consumer_group => 'MAINTENANCE',comment => 'Consumer group for maintenance jobs');dbms_resource_manager.validate_pending_area();185

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!