resmgr:cpu quantum Top Event Issues Solved

What's the problem?

Via awr report, below top event was found. How to solve Top 1 event: resmgr:cpu quantum  ?


Top 5 Timed Foreground Events



EventWaitsTime(s)Avg wait (ms)% DB timeWait Class
resmgr:cpu quantum150,482109,71772926.75Scheduler
DB CPU
40,945
9.98
latch: cache buffers chains192,60735,5671858.67Concurrency
log file sync75,66213,5791793.31Commit
db file sequential read128,1963,371260.82User I/O

Host CPU (CPUs: 2 Cores: Sockets: )


What's the root cause?

ResourceManager:

Subject

10g

11g

Maintenance Window

2 windows, WEEK and  WEEKEND

Each day has its own  window

Resource manager

Not enabled per  default

Default resource plan  specified

SqlTunning Advisory:

Oracle Database 11g, bydefault, the Automatic Tunning Optimizer runs regularly during the Oraclescheduler Maintenance window, as the new automated maintenance task called theSQL Tunning Advisory task.


So this is a default behavior in Oracle 11g.

SOLUTION

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

++ set thecurrent 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 othernonrestrictive 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:

executedbms_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('<windowname>','RESOURCE_PLAN','');


補充如何獲得awr report:

pwd

/home/oracle

export ORACLE_SID=xx

sqlplus / as sysdba

SQL> @?/rdbms/admin/awrrpt.sql


Current Instance

~~~~~~~~~~~~~~~~


  DB Id    DB Name      Inst Num Instance

----------- ------------ -------- ------------

 165375853 WAPI2               1 wapi2



Specify the Report Type

~~~~~~~~~~~~~~~~~~~~~~~

Would you like an HTML report, or a plain text report?

Enter 'html' for an HTML report, or 'text' for plain text

Defaults to 'html'

Enter value for report_type: html


Type Specified:  html



Instances in this Workload Repository schema

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  DB Id     Inst Num DB Name      Instance     Host

------------ -------- ------------ ------------ ------------

* 165375853         1 WAPI2        wapi2        oradbhasvr00

                                               1


Using  165375853 for database Id

Using          1 for instance number



Specify the number of days of snapshots to choose from

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Entering the number of days (n) will result in the most recent

(n) days of snapshots being listed.  Pressing <return> without

specifying a number lists all completed snapshots.



Enter value for num_days: 1


Listing the last day's Completed Snapshots


                                                       Snap

Instance     DB Name        Snap Id    Snap Started    Level

------------ ------------ --------- ------------------ -----

wapi2        WAPI2            13418 02 Aug 2013 00:00      1

                             13419 02 Aug 2013 01:00      1

                             13420 02 Aug 2013 02:00      1




Specify the Begin and End Snapshot Ids

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Enter value for begin_snap: 13418

Begin Snapshot Id specified: 13418


Enter value for end_snap: 13420

End   Snapshot Id specified: 13420




Specify the Report Name

~~~~~~~~~~~~~~~~~~~~~~~

The default report file name is awrrpt_1_13418_13420.html.  To use this name,

press <return> to continue, otherwise enter an alternative.


Enter value for report_name: wapi2.html


....

然後在當前目錄下獲得圖章診斷報告wapi2.html。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章