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。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值