Oracle 12.1 m00*进程消耗大量CPU问题

149 篇文章 21 订阅

开发反映业务特别慢,几乎不能连上。登录服务器发现确实非常慢,但是数据库能连上。

top发现总CPU消耗不高但部分进程CPU消耗非常高,其中大部分是ora_m00x进程。而在CPU下降后,卡顿现象消失。

 

获取awr报告,发现消耗最高是以下sql

搜索MOS发现与文档High CPU Usage and/or Frequent Occurrences of ORA-12850 For Monitor Queries by MMON From 12.1 (文档 ID 2102131.1)描述相近,怀疑是其所描述的新特性导致,但由于故障已自动恢复且未再复现,没测试过是否真有效。

 

SYMPTOMS

  • MMON consumes more CPU due to the monitoring activity in 12.1
  • High CPU consumption and time spent while executing monitor-related queries from both MMON_SLAVE like following:
WITH MONITOR_DATA AS (SELECT INST_ID, KEY, NVL2(PX_QCSID, NULL, STATUS)STATUS,
FIRST_REFRESH_TIME, LAST_REFRESH_TIME, REFRESH_COUNT, PROCESS_NAME, SID, SQL_ID,
SQL_EXEC_START, SQL_EXEC_ID, DBOP_NAME, DBOP_EXEC_ID, SQL_PLAN_HASH_VALUE,
SESSION_SERIAL#, SQL_TEXT, IS_FULL_SQLTEXT, PX_SERVER#, PX_SERVER_GROUP, PX_SERVER_SET,
PX_QCINST_ID, PX_QCSID, CASE WHEN ELAPSED_TIME < (CPU_TIME+ APPLICATION_WAIT_TIME+ CONCURRENCY_WAIT_TIME+ CL...;
  • The frequent occurrences of ORA-12850 may be present in the Alert.log in both a RAC and NON-RAC environment. The failing queries are consistently executed against GV$SQL_MONITOR.
  • Occurrences of ORA-12751 may be seen when parallelism is not used.

 

CAUSE

There is a new feature in 12C called "Automatic Report Capturing Feature". As part of this feature, some monitoring SQLs are executed by MMON_SLAVE to identify the resource-intensive SQLs and generate the SQL Monitoring report automatically for those SQLs. Those SQLs consume little more CPU and it is expected behavior being a new feature. Such monitoring queries can be identified from (G)V$SQLSTATS.

However, If the CPU consumption is significantly high then it is not an expected behavior and could be due to optimizer choosing suboptimal plan for the SQL statements.This can happen due to Adaptive Optimization, a new feature in 12c.

Document 2031605.1 Adaptive Query Optimization

 

SOLUTION

1.  The new feature can be disabled to reduce the CPU consumption:

alter system set "_report_capture_cycle_time"=0; /* This is system modifiable with immediate.Default is 60 seconds */

There is no negative impact in setting the above parameter as it disables only the automatic report capturing feature introduced in 12c. It does not disable the original SQL monitoring framework. SQL monitoring can be used very well without any issues.

Or

2. Kill MMON SLAVE from os.  

The sid and serial number can be obtained from ASH report. If there are multiple MMON slaves, kill all slaves.

 

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Hehuyi_In

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值