Doc ID 1476663.1) To Bottom

In this Document

  Purpose
  Troubleshooting Steps
  Brief Definition:
  Problem Confirmation:
  Library Cache Pin
  Cursor Pin S wait on X
  Improving Performance of Library cache pin or Pin S wait on X
  Measuring Success
  Known Issues
  References

APPLIES TO:

Oracle Database - Enterprise Edition - Version 7.0.16.0 and later
Oracle Database - Standard Edition - Version 7.0.16.0 and later
Oracle Database - Personal Edition - Version 7.1.4.0 and later
Information in this document applies to any platform.

PURPOSE

Disclaimer: This note is written in the context that the Performance Guided Resolution tool was used and recommended this article. It may not make as much sense if read standalone or by other audiences.

TROUBLESHOOTING STEPS

Brief Definition:

This note covers issues where the Guided Resolution Tool indicates contention as a result "library cache pins" or "Cursor Pin S wait on X".

In 10g and later, library cache pins are replaced by mutexes. So library cache pins and Pin S wait on X are similar waits but different names for different versions.

在这里 官方明确指出  library cache pin 被 cursor pin S wait on X  替换 。

Problem Confirmation:

  • Library cache pin for pre 10g may be significant
  • Cursor: Pin S wait on X may be significant on 10g and later
  • High CPU with per above waits

Library Cache Pin

Library cache pin deals with concurrent wait for library cache.

When a pin is acquired, it causes the object’s heap to be loaded into memory if it is not already there.

A wait for a "library cache pin" implies some other session holds that PIN in an incompatible mode.

(比方说 2 shared与3 exclusive 模式不兼容,导致互相排斥,引起此等待事件)

For example, if an object structure is changed such as dropping a column, it will cause library cache pin wait and implies it is held in exclusive mode.

So be careful when changing the structure of an object and try to do it during slow time of the day.

For more information on scenarios of library cache pin, review the following note:

Note:115656.1 WAIT SCENARIOS REGARDING LIBRARY CACHE PIN AND LIBRARY CACHE LOAD LOCK

Cursor Pin S wait on X

Mutex wait is similar to library cache pin wait but was introduced for 11g.  A session waits for "cursor: pin S wait on X" when it wants a mutex in S (share) mode on a specific cursor but some other session holds that same mutex in X (exclusive) mode. Hence the current session has to wait for the X mode holder to release the mutex.

Improving Performance of Library cache pin or Pin S wait on X

The library cache pin wait often happens when you are compiling or parsing a PL/SQL object or a view.  Recompilation may be due to invalidations.  Invalidations are usually due to ddls.  So check for ddls at the time of the issue.  For further information, review following note:

Note:444560.1 Troubleshooting Library Cache: Load,Lock, and Pin Lock

Pin S wait on X is usually due to high parses.  So check for high parsing sqls or tune application to share cursors.  For further diagnosis, please review following note:

Note:1349387.1  Troubleshooting 'Cursor: Pin S wait on X' wait

Measuring Success

Once you have applied the changes to resolve the issues you have found, compare the latest AWR to the AWR that led you here via Guided Resolution (that AWR becomes your baseline). Look at the percentage decrease total wait time for this event. If there are still issues, re- evaluate those and address them according to the specific symptom.

Known Issues

Document 6011045.8 DBMS_STATS causes deadlock between ‘cursor:pin S wait on X’ and ‘library cache lock’

Document 9694101.8 Hang / deadlock between "cursor: pin S wait on X" and "library cache lock" involving dictionary objects

Document 2127483.1 Database Hang on 12c with 'Cursor: Pin S wait on X', 'Row Cache Lock' and 'Library Cache Load Lock'

Document 1949691.1 High Wait Time for 'cursor: pin S wait on X' Event After Upgrade

Resolving Issues of "Library Cache Pin" or "Cursor Pin S wait on X" (Doc ID 1476663.1)的更多相关文章

  1. library cache lock和cursor: pin S wait on X等待

    1.现象: 客户10.2.0.4 RAC环境,出现大量的library cache lock和cursor: pin S wait on X等待,经分析是由于统计信息收集僵死导致的.数据库在8点到9点 ...

  2. 关于library cache lock和row cache lock产生的常见原因

    这两个等待事件其实很少出现在top5列表中,一般都没什么印象,在此整理记录以便以后查阅. 常见的library cache lock产生的原因在<高级OWI与Oracle性能调查>这本书和 ...

  3. 如何使用event 10049分析定位library cache lock and library cache pin

    Oracle Library Cache 的 lock 与 pin 说明 一. 相关的基本概念 之前整理了一篇blog,讲了Library Cache 的机制,参考: Oracle Library c ...

  4. cursor pin S wait on X

    cursor pin S wait on X: 这是10.2版本提出的mutex(互斥)机制用来解决library cache bin latch争夺问题引入的新事件,是否使用这种机制受到隐含参数_k ...

  5. Library cache lock/pin详解

    Library cache lock/pin 一.概述 ---本文是网络资料加metalink 等整理得来一个实例中的library cache包括了不同类型对象的描述,如:游标,索引,表,视图,过程 ...

  6. 深入理解shared pool共享池之library cache的library cache pin系列三

    关于library cache相关的LATCH非常多,名称差不多,我相信一些人对这些概念还是有些晕,我之前也有些晕,希望此文可以对这些概念有个更为清晰的理解,本文主要学习library cache p ...

  7. 外键约束列并没有导致大量建筑指数library cache pin/library cache lock

    外键约束列并没有导致大量建筑指数library cache pin/library cache lock 清除一个100大数据表超过一百万线,发现已经运行了几个小时: delete B001.T_B1 ...

  8. Library Cache: Lock, Pin and Load Lock

    What is "Library cache lock" ? This event controls the concurrency between clients of the ...

  9. 共享池之六:shared pool latch/ library cache latch /lock pin 简介

    latch:library cache --desc v$librarycache; latch:library cache用于保护hash bucket.library cache lock保护HA ...

随机推荐

  1. DocX开源WORD操作组件的学习系列四

    DocX学习系列 DocX开源WORD操作组件的学习系列一 : http://www.cnblogs.com/zhaojiedi1992/p/zhaojiedi_sharp_001_docx1.htm ...

  2. centos7忘记root密码

    开机时狂点方向键下(Windows还原习惯了),或者狂点别的键.目的为了不让它进入系统. 方向键移动光标定位在第一行,按e编辑它. 在新界面找到linux16开头的行.→光标到  ro    改成rw ...

  3. -1-6 java 异常简单介绍 java异常 异常体系 Throwable 分类 throws和throw 异常处理 自定义异常

      异常   异常:异常就是Java程序在运行过程中出现的错误. 异常由来:问题也是现实生活中一个具体事务,也可以通过java 的类的形式进行描述,并封装成对象. 其实就是Java对不正常情况进行描述 ...

  4. 【Zabbix】zabbix设置邮件报警

    目录 Zabbix设置邮件报警 1.安装sendmail或postfix 2.安装邮件发送工具mailx . 3.配置mail 4. 测试邮件发送 5.编写邮件发送脚本sendmail.sh 6.设置 ...

  5. Java开发笔记(六十四)静态方法引用和实例方法引用

    前面介绍了方法引用的概念及其业务场景,虽然在所列举的案例之中方法引用确实好用,但是显而易见这些案例的适用场合非常狭窄,因为被引用的方法必须属于外层匿名方法(即Lambda表达式)的数据类型,像isEm ...

  6. windows安装elasticsearch

    1. 去官网 https://www.elastic.co/cn/ 下载 注意: ES对JDK版本有较高的要求,5.x及以上版本需要JDK8支持,本人此次使用2.4.6版本2. 下载后,JDK先安装, ...

  7. Mybatis框架基础支持层——日志模块(8)

    前言: java开发中常用的日志框架有Log4j,Log4j2,Apache Commons Log,java.util.logging,slf4j等,这些工具对外的接口不尽相同.为了统一这些工具的接 ...

  8. iptables配置管理

    iptables规则 内核netfilter的规则: iptables的规则: 基本操作 实践:往iptables中插入一条规则:禁止基于端口号为22的所有客户端访问(等于是禁止基于SSH的客户端连接 ...

  9. 多线程(3)ThreadPool

    使用Thread类已经可以创建并启动线程了,但是随着开启的线程越来越多,线程的创建和终止都需要手动操作,非常繁琐,另一个问题是,开启更多新的线程但是没有用的线程没有及时得到终止的时候,会占用越来越多的 ...

  10. java开发环境配置——IntelliJ IDEA

    关于开发工具,之前是用eclipse,后来用了一段时间idea后,发现idea比eclipse好用太多了,所以推荐大家用idea 官网下载地址:https://www.jetbrains.com/id ...