resmgr:cpu quantum wait event
The “resmgr:cpu quantum” wait event is seen when the session is waiting for some CPU resources to be allocated. This event occurs when the resource manager is activated and throttles the CPU consumption.
With the query below, you can see whether the “resmgr:cpu quantum” wait event exists and how much of an impact it has.
SELECT
wait_class,
NAME,
ROUND (time_secs, 2) time_secs,
ROUND (time_secs * 100 / SUM (time_secs) OVER (), 2) pct
FROM
(SELECT
n.wait_class,
e.event NAME,
e.time_waited / 100 time_secs
FROM
v$system_event e,
v$event_name n
WHERE
n.NAME = e.event AND n.wait_class <> 'Idle'
AND
time_waited > 0
UNION
SELECT
'CPU',
'server CPU',
SUM (VALUE / 1000000) time_secs
FROM
v$sys_time_model
)
ORDER BY
time_secs DESC;
The following steps should be followed for the solution.
First, make sure that the resource_manager_plan parameter has no value. If there is any value, you can empty it as follows.
SQL> alter system set resource_manager_plan='' scope=both sid='*';
Then empty the RESOURCE_PLAN value for all Maintenance Windows. You can see the current maintenace windows from the dba_scheduler_windows view.
SQL> execute dbms_scheduler.set_attribute('SATURDAY_WINDOW','RESOURCE_PLAN','');
SQL> execute dbms_scheduler.set_attribute('SUNDAY_WINDOW','RESOURCE_PLAN','');
SQL> execute dbms_scheduler.set_attribute('MONDAY_WINDOW','RESOURCE_PLAN','');
SQL> execute dbms_scheduler.set_attribute('TUESDAY_WINDOW','RESOURCE_PLAN','');
SQL> execute dbms_scheduler.set_attribute('WEDNESDAY_WINDOW','RESOURCE_PLAN','');
SQL> execute dbms_scheduler.set_attribute('THURSDAY_WINDOW','RESOURCE_PLAN','');
SQL> execute dbms_scheduler.set_attribute('FRIDAY_WINDOW','RESOURCE_PLAN','');
If there are the following windows, the same process should be done for them.
SQL> execute dbms_scheduler.set_attribute('WEEKNIGHT_WINDOW','RESOURCE_PLAN','');
SQL> execute dbms_scheduler.set_attribute('WEEKEND_WINDOW','RESOURCE_PLAN','');
Finally, check the cpu_count parameter. If the physical cpu is sufficient, increase the cpu_count value. You can change it as follows.
SQL> alter system set cpu_count=24 scope=both sid='*';
System altered.
After these operations, you will see that the “resmgr:cpu quantum” wait event has decreased with the above wait event query.