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



Event Waits Time(s) Avg wait (ms) % DB time Wait Class
resmgr:cpu quantum 150,482 109,717 729 26.75 Scheduler
DB CPU
40,945
9.98
latch: cache buffers chains 192,607 35,567 185 8.67 Concurrency
log file sync 75,662 13,579 179 3.31 Commit
db file sequential read 128,196 3,371 26 0.82 User 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。

你可能感兴趣的:(故障诊断)