问题背景:客户反应数据库服务器CPU占用过高

1> 确认问题根源
登录客户DB服务器: top 查看当前负载 (几乎100%)
top - 10:47:55 up 29 days, 21:51, 3 users, load average: 54.02, 54.00, 54.00
Tasks: 528 total, 55 running, 473 sleeping, 0 stopped, 0 zombie
Cpu(s): 99.2%us, 0.7%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 65977660k total, 23209792k used, 42767868k free, 349208k buffers
Swap: 8232952k total, 0k used, 8232952k free, 20103832k cached

2> 查看CPU top sql

EVENT事件 为 cursor:mutex S (这里做个标记) 某个进程以SHRD S mode申请一个Mutex, 而该Mutex要么被其他进程已EXCL X mode所持有,要么其他进程正在更新mutex 上的Ref Count。

3> 根据sql_id 查看问题sql

SQL>select * from table(dbms_xplan.display_awr('66xctbkxrrt7v'));
no rows selected --(查不出sql)
查不出问题sql,从event:cursor:mutex S入手

查看AWR报告

4> 查看客户DB版本

查看官方MOS
GOAL
Customer upgraded the DB Repository for Oracle Waveset from Oracle 10g to Oracle 11g.
Cursor sharing was set to SIMILAR as per the Oracle Waveset Documentation in 10g.
Child cursors were getting released in 10g. Customer noticed child cursors were not getting released in 11g.

Cursor Mutex S wait event and too many child cursors open when cursor sharing is set to similar.
As per the documentation in MOS 1169017.1 cursor sharing should be exact or force.

SOLUTION
The recommendation to set the 'cursor_sharing' option as 'SIMILAR' was to remedy the known issues when 'cursor_sharing' was set to be the default 'EXACT' option in previous versions of Oracle Waveset and Oracle 10g as repository.

Since the Oracle 11g database deprecates the 'SIMILAR' option, the recommendation now is to set 'cursor_sharing' to 'FORCE'.

REFERENCES
BUG:13983028 - RECOMMENDATION FOR CURSOR_SHARING PARAMETER WITH ORACLE 11G REPOSITORY --确认11.2.0.1引发bug

这个BUG 影响 12.2 以下的主要版本,包括 11.2.0.2 和 11.2.0.4。(仅供参考)
确认的影响版本是:
11.2.0.3.5 Database Patch Set Update
11.2.0.3.4 Database Patch Set Update
11.2.0.3 Bundle Patch 11 for Exadata Database
11.2.0.2.9 Database Patch Set Update
11.2.0.2.8 Database Patch Set Update
11.2.0.2 Bundle Patch 18 for Exadata Database
11.2.0.3 Patch 11 on Windows Platforms
11.2.0.2 Patch 22 on Windows Platforms

确认的修复版本是:
12.2.0.1 (Base Release)
12.1.0.2 (Server Patch Set)
11.2.0.4 (Server Patch Set)
11.2.0.3.6 Database Patch Set Update
11.2.0.3 Bundle Patch 16 for Exadata Database
11.2.0.2.10 Database Patch Set Update
11.2.0.2 Bundle Patch 20 for Exadata Database
11.2.0.3 Patch 18 on Windows Platforms
11.2.0.2 Patch 25 on Windows Platforms

5> 解决问题:修改隐含参数
alter system set "_cursor_features_enabled"=34 scope=spfile sid='*';
alter system set event='106001 trace name context forever,level 1024' scope=spfile sid='*'; --需重启数据库

客户同意重启数据库后检查

问题解决

最新文章

  1. 个人学习随笔(psi-blast随笔)
  2. SEO站点优化学习总结
  3. JVM性能监控与故障处理命令行工具
  4. testNG设置测试的执行顺序
  5. HDOJ(1010)DFS+剪枝
  6. Delphi inline编译器优化问题
  7. KMP算法(快速模式匹配)
  8. 第四章 Js的面向对象的初窥视(天生的哈希表)
  9. Memory Allocation API In Linux Kernel && Linux Userspace、kmalloc vmalloc Difference、Kernel Large Section Memory Allocation
  10. Cocos2d-x优化中关于背景图片优化
  11. Java调用外部程序常用算法和封装类
  12. 【BZOJ】1088: [SCOI2005]扫雷Mine
  13. file is missing from source location:c\temp\batang.ttc
  14. jsonp跨域访问详解
  15. App 运营 推广相关
  16. HTTP 错误500.19 -Internal Server Error
  17. numpy.random 常用函数详解之简单随机数篇(Simple random data)
  18. Linux终端小技巧
  19. Android.Tools.Eclipse hangs at the Android SDK Content Loader
  20. 常用的cpl 命令 运行直接打开控制台的简单方法

热门文章

  1. PAT 天梯杯 L2-024 部落 dfs,连通块
  2. 爬虫反爬之代理IP
  3. box-sizing(CSS3)
  4. 微信公众号之获取openId
  5. Storm 系列(四)—— Storm 集群环境搭建
  6. idea中applicationContext-dao.xml文件中Cannot resolve file***** :spring xml model validation问题
  7. Winform中使用FastReport实现简单的自定义PDF导出
  8. CCPC桂林
  9. 近日让很多人议论纷纭的P++,PHP新分支?
  10. Charles 修改请求/compose和Compose New