How to resmgr cpu quantum wait
Issue:
When the DB Performance issue is reported, After checking found the server load is very low, CPU/IO 90+ percent free.
But many sessiones waiting on event “resmgr:cpu quantum”. From AWR report we can see “resmgr:cpu quantum” is the TOP one consuming 100% DB time
What/Why resmgr:cpu quantum :
“resmgr:cpu quantum” means a session is waiting in a resource queue, wait until resource manager assign CPU pieces to it.
The wait event resmgr:cpu quantum is a normal wait event used by the Oracle Resource Manager to control CPU distribution. The resmgr:cpu quantum only occurs when the resource manager is enabled and the resource manage is “throttling” CPU consumption.
This is due to DEFAULT_MAINTENANCE_PLAN. From 11g onwards every weekday window has a pre-defined Resource Plan called DEFAULT_MAINTENANCE_PLAN, which will become active once the related window opens. In 10gR2, DEFAULT_MAINTENANCE_PLAN is associated with WEEKNIGHT_WINDOW and WEEKEND_WINDOW.
You can confirm this using the below SQL
SQL> select name,value from v$parameter where name in (‘resource_manager_plan’,’resource_limit’)’
SQL> show parameter resource
SQL> select window_name,resource_plan,last_start_date,duration,enabled from dba_scheduler_windows;
Solution:
Note 392037.1 – Database ‘Hangs’. Sessions Wait for ‘resmgr:cpu quantum’
Note 1339803.1 Recommended Patches for CPU Resource Manager
Set the maintenance window to other time where CPU resource is available maximum
During peak time clear the resource_manager_plan to none
alter system set resource_manager_plan=” scope=both;
You can disable resource plan for specific days by following commands
execute dbms_scheduler.set_attribute(‘MONDAY_WINDOW’,’RESOURCE_PLAN’,”);
Note: The above command will disable resource plan for Monday only