關於resmgr:cpu quantum異常等待處理

shawnloong發表於2017-06-24
今天收到告警簡訊
故障資訊:伺服器:XXX_DB1發生: Processor load is too high on XXX_DB1故障!
告警時間:2017.06.24   12:22:42
告警主機:XXX_DB1
IP地址: x.x.x.x
告警資訊: Processor load is too high on XXX_DB1
告警專案:system.cpu.load[all,avg1]
故障值: 22.49
當前狀態:PROBLEM:22.49
事件ID:297252
負載已經很高了(備註8核)
檢視伺服器負載,絕大部分是oracle程式
立即做了一個awr快照
發現有一個異常等待

此伺服器安裝的是oracle 11.2.0.1未安裝任何補丁
Database 'Hangs'. Sessions Wait for 'resmgr:cpu quantum' (文件 ID 392037.1) 此文件記錄
The session is waiting to be allocated a quantum of cpu. 
This event occurs when the resource manager is enabled and is throttling CPU consumption. 
To reduce the occurrence of this wait event, increase the CPU allocation for the session's current consumer group.

Wait Time: The time the session waited to acquire a CPU quantum

"

Event 'resmgr: cpu quantum' 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.

SOLUTION

Before looking at specifics, it is prudent to ensure that you are running with recommended patches installed for Resource Manager.  Refer to the following article for details:

Document 1339803.1 Recommended Patches for CPU Resource Manager

Additionally there are some known issues associated with resource manager and the Wait Event "Resmgr:Cpu Quantum" listed in the following articles:

As a workaround, resource management could be disabled:
我們可以關閉resouce management
Resource Manager and SQL Tuning Advisory DEFAULT_MAINTENANCE_PLAN (文件 ID 786346.1)

 To disable the resource manager you can use the below steps. 

++ set the current resource manager plan to null (or another plan that is not restrictive): 

alter system set resource_manager_plan='' scope=both

++ change the active windows to use the null resource manager plan (or other nonrestrictive plan) using: 

execute dbms_scheduler.set_attribute('WEEKNIGHT_WINDOW','RESOURCE_PLAN',''); and 
execute dbms_scheduler.set_attribute('WEEKEND_WINDOW','RESOURCE_PLAN','');

For 11g, you need to change those too:

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','');

++ Then, for each window_name (WINDOW_NAME from DBA_SCHEDULER_WINDOWS), run: 

SQL> execute dbms_scheduler.set_attribute('<window name>','RESOURCE_PLAN','');

To disable SQL tuning you can use the below procedure.  

BEGIN 
DBMS_AUTO_TASK_ADMIN.DISABLE( 
client_name => 'sql tuning advisor', 
operation => NULL, 
window_name => NULL); 
END; 
/






來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24486203/viewspace-2141217/,如需轉載,請註明出處,否則將追究法律責任。

相關文章