升级到oracle 12c,有时会看到mmon_slave模块的cpu使用率很高。这些模块与12cr1新特性automatic report capturing(自动报告捕获功能)有关。
oracle 11g引入了real-time sql monitoring,用于实时监控sql在实现中的性能,oracle 12c进一步扩展了其引入的历史sql监控功能。该功能类似于通过后台进程mmon_slave定期对存储在数据库表中的sql监控信息进行ash信息的历史管理。
作为该功能的一部分,一些监控sql由mmon_slave执行,以识别资源密集型sql和为这些sql自动生成sql监控报告。这些sql只消耗很少的cpu,预期行为是一个新功能。这样的监控查询可以从(g)v$sqlstats中识别出来。
官方说由于12.1中的监控活动,mmon消耗的cpu很少。然而,如果cpu消耗非常高,那么这不是预期的行为,可能是由于优化器为sql语句选择了次优计划。
从以下两个mmon_slave执行与监视器相关的查询时,cpu消耗和时间都很高:
1)经常在awr top sql中出现
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
...;
2)在rac和non-rac环境中,alert.log中都可能频繁出现以下错误。失败的查询始终针对gv$sql_monitor执行:
ora-12850: could not allocate slaves on all specified instances: 3 needed, 2 allocated
tip: ora-12850 m002 trace maybe show as the following, note that the red font text matches the sql above
ora-12850: could not allocate slaves on all specified instances: 2 needed, 0 allocated
dump of memory from 0xc00000194f9726c8 to 0xc00000194f98840c
c00000194f9726c0 57495448 204d4f4e [with mon]
c00000194f9726d0 49544f52 5f444154 41204153 20285345 [itor_data as (se]
c00000194f9726e0 4c454354 20494e53 545f4944 2c204b45 [lect inst_id, ke]
c00000194f9726f0 592c204e 564c3228 50585f51 43534944 [y, nvl2(px_qcsid]
c00000194f972700 2c204e55 4c4c2c20 53544154 55532920 [, null, status) ]
c00000194f972710 53544154 55532c20 46495253 545f5245 [status, first_re]
c00000194f972720 46524553 485f5449 4d452c20 4c415354 [fresh_time, last]
凯发app官方网站的解决方案:
参考下面提供的凯发app官方网站的解决方案:
ora-12850 is raised by mmon slave automatic report flush action (文档 id 2217969.1)
high cpu usage and/or frequent occurrences of ora-12850 for monitor queries by mmon from 12.1 (文档 id 2102131.1)
bug:24554937 ora-12850 while mmon slave automatic report flush action
禁止这个特性即可:
alter system set "_report_capture_cycle_time"=0; /* default is 60 seconds */
阅读(540) | 评论(0) | 转发(0) |