当前位置: 首页 > 图文教程 > 数据库 > Oracle > Oracle10gR2上遇到了Mutex竞争的问题

Oracle
Oracle 数据库自动存储管理-安装配置
ORACLE 10g 安装教程[图文]
Oracle 的入门心得 强烈推荐
Windows Oracle常见服务介绍
oracle 发送邮件 实现方法
在Spring中用select last_insert_id()时遇到问题
oracle sqlplus 常用命令大全
oracle 触发器 学习笔记
Oracle 随机数
ProC 连接Oracle代码
MS Server和Oracle中对NULL处理的一些细节差异
oracle10g 数据备份与导入
oracle 安装与SQLPLUS简单用法
Oracle SID存在解決方法
Oracle 低权限数据库账户得到 OS 访问权限 提权利用
oracle 动态AdvStringGrid完美示例 (AdvStringGrid使用技巧/Cells)
oracle 集合
oracle 字符串转成行
Oracle10g 安装方法
oracle 日期函数集合(集中版本)

Oracle10gR2上遇到了Mutex竞争的问题


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-30   浏览: 79 ::
收藏到网摘: n/a

最近有客户在Oracle10gR2上遇到了Mutex竞争的问题。

  Mutex是Oracle在Oracle10g中引入的串行机制,逐渐会用来替代一些存在性能问题的Latch.和Latch相比,一个Mutex Get大约仅需要30~35个指令,而Latch Get则需要大约150~200个指令,同时在大小上,每个Mutex仅占用大约16 Bytes空间,而一个latch在10gR2中要占用大约112 Bytes空间。

  Mutex首先替代了Library Cache Latch以及Library Cache Pin,在Oracle 10.2.0.2上通过隐含参数_kks_use_mutex_pin的调整可以限制是否使用Mutex机制来实现Cursor Pin:


  SQL> set linesize 120
  SQL> col name for a30
  SQL> col value for a20
  SQL> col describ for a60
  SQL> SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ
  2 FROM SYS.x$ksppi x, SYS.x$ksppcv y
  3 WHERE x.indx = y.indx
  4 AND x.ksppinm LIKE '%&par%'
  5 /
  Enter value for par: mutex
  old 4: AND x.ksppinm LIKE '%&par%'
  new 4: AND x.ksppinm LIKE '%mutex%'
  NAME VALUE DESCRIB
  ------------------------------ -------------------- ------------------------------------------------------------
  _kks_use_mutex_pin TRUE Turning on this will make KKS use mutex for cursor pins.

  在新的Mutex Pins机制下,以下等待事件可能变得常见:


  cursor: mutex S
  cursor: mutex X
  cursor: pin S
  cursor: pin S wait on X
  cursor: pin X

  由于Mutex使用CAS(Compare and Swap)机制,所以在不支持CAS的HP Unix平台上就可能出现CPU消耗过高的情况。

  这作为一个Bug在10.2.0.4版本中被修正。