SCOPE
Application job are running slow and DBA finds out the wait event as "Resmgr:Cpu Quantum" for multiple sessions running in database.
RESMGR: CPU QUANTUM
resmgr: cpu quantum also occurs when CPU caging happens to resource manager being active and CPU_COUNT parameter has been hit.
We should review the resource manager maintenance windows or disable resource manager/increase CPU_COUNT, If this is going to be a regular kind of load
at this time in the day.
- Sessions are sharing CPU, not necessarily a problem
- A session is waiting in a resource queue, wait until resource manager assign CPU pieces to it.
- It occurs when the resource manager is enabled and the resource manage is “throttling” CPU consumption.
- Is a standard event used by resource manager to controls the allocation of CPU to processes.
- It is possible that a 'hang' situation could be seen when sessions use significant CPU for whatever reason.
- Alternatively, this could also indicate that true hang situation is taking place.
CHECKS
SQL> !cat /proc/cpuinfo|grep processor|wc -l
SQL> show parameter resource_manager_cpu_allocation
SQL> show parameter cpu_count
col window_name format a17
col RESOURCE_PLAN format a25
col LAST_START_DATE format a50
col duration format a15
col enabled format a5
select window_name, RESOURCE_PLAN, LAST_START_DATE, DURATION, enabled from DBA_SCHEDULER_WINDOWS;
If you find out that it is enabled using above query, One can proceed with disabling it as below.
It is not concerned about automated tasks taking more CPU if it was already disabled using
execute DBMS_AUTO_TASK_ADMIN.DISABLE;
Workaround
Following are the steps to be done by DBA to fix this wait and disable Resource Manager.
1) Set the current resource manager plan to null. OR
alter system set resource_manager_plan='';
alter system set resource_manager_plan='' scope=both;
2) Change the active windows to use the null resource manager plan (or other non-restrictive plan) using:
execute dbms_scheduler.set_attribute('WEEKNIGHT_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('WEEKEND_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('SATURDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('SUNDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('MONDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('TUESDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('WEDNESDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('THURSDAY_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('FRIDAY_WINDOW','RESOURCE_PLAN','');
OR
execute dbms_scheduler.set_attribute('WEEKNIGHT_WINDOW','RESOURCE_PLAN','');
execute dbms_scheduler.set_attribute('WEEKEND_WINDOW','RESOURCE_PLAN','');
AND
execute dbms_scheduler.set_attribute('','RESOURCE_PLAN','');
RELATED MOS
High "Resmgr:Cpu Quantum" Wait Events In 11g Even When Resource Manager Is Disabled [ID 949033.1]
Resource Manager and Sql Tunning Advisory DEFAULT_MAINTENANCE_PLAN [ID 786346.1]
Found this post interesting? Subscribe us 😊😉
Do post your comments..
-- Nikhil
No comments:
Post a Comment