What is a 'library cache: mutex X' wait?

The mutex feature is a mechanism to control access to in memory structures. It is used in a number of areas including the library cache.

The library cache is a memory area that holds parsed cursor structures needed to execute SQL.

Waits for 'library cache: mutex X' are similar to a library cache waits in earlier versions.  'library cache: mutex X' may be caused by many issues (including application issues, lack of sharing resulting in high version counts etc.) but essentially something is holding the mutex for "too long" such that other session have to wait for the resource.  If there is contention on the latches/mutexes that protect the library cache structures this means that there is stress on the parsing system. Parsing of SQL takes longer because it cannot get the resources they need. This delays other operations and generally slows the system.

Because of the varied causes, it is important to find the correct cause; so that the right solution can be implemented.

What causes 'library cache: mutex X' wait?

    • Frequent Hard Parses - If the frequency of Hard Parsing is extremely high, then contention can occur on this pin.
    • High Version Counts - When Version counts become excessive, a long chain of versions needs to be examined and this can lead to contention on this event
    • Invalidations - An invalidation is a measure of the number of times a cached cursor is deleted from the cache because it is no longer valid. A cursor is invalidated because something has changed such that the copy of the cursor in memory is not valid any more. For example, regathering the statistics on an object or modifying a table definition is enough to invalidate a cursor for a query that is based on that object. When a cursor is invalidated, any sessions wanting to use the cursor need to wait for a valid version to be loaded. If there is excessive or unnecessary invalidation then significant waits for 'library cache: mutex X' can be seen.
    • Reloads - Reload is a count of the number of times a cursor that previously existed in the cache, was searched for, found to not be there (because it had aged out etc) and then had to be re-compiled and re-loaded in to the library cache. High reloads are a bad thing because they indicate that you are doing work that you would not have had to do if your cache was setup appropriately so as not to remove the cursor in the first place. If a cursor is being reloaded then it cannot be grabbed for work by a session and this can lead to waits for 'library cache: mutex X'.
    • Known Bugs

Troubleshooting 'library cache: mutex X' Waits.的更多相关文章

  1. Troubleshooting 'library cache: mutex X' Waits. (Doc ID 1357946.1)

    In this Document   Purpose   Troubleshooting Steps   What is a 'library cache: mutex X' wait?   What ...

  2. library cache: mutex X

    我们先来看看 library cache: mutex X . 是个什么东西 The library cache mutex is acquired for similar purposes that ...

  3. 11g等待事件之library cache: mutex X

    11g等待事件之library cache: mutex X 作者: dbafree 日期: 2012 年 07 月 01 日发表评论 (0)查看评论   library cache: mutex X ...

  4. [20190402]Library Cache mutex.txt

    [20190402]Library Cache mutex.txt 1.环境:SCOTT@book> @ ver1PORT_STRING                    VERSION   ...

  5. Oracle数据库大量library cache: mutex X及latch: shared pool问题排查一例

    业务系统数据库夯住,数据库内大量的library cache: mutex X及latch: shared pool等待,alert日志信息如下 Tue Sep :: WARNING: inbound ...

  6. Resolving Issues of "Library Cache Pin" or "Cursor Pin S wait on X" (Doc ID 1476663.1)

    Doc ID 1476663.1) To Bottom In this Document   Purpose   Troubleshooting Steps   Brief Definition:   ...

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

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

  8. Performance tuning library cache lock & single-task message

    My colleague suddenly encountered a problem today,a Database becomes very slow , and the a lot of se ...

  9. Using dbms_shared_pool.purge to remove a single task from the library cache

    我们都知道可是使用 alter system flush shared_pool 来清除shared pool 信息,当时不能指定清除某个对象.因为在系统繁忙的时侯 使用 alter system f ...

随机推荐

  1. [mysql] ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.

    今天安装mysql遇到这样一个问题: ERROR 1862 (HY000): Your password has expired. To log in you must change it using ...

  2. 【mysql】mysql分表和表分区详解

    为什么要分表和分区? 日常开发中我们经常会遇到大表的情况,所谓的大表是指存储了百万级乃至千万级条记录的表.这样的表过于庞大,导致数据库在查询和插入的时候耗时太长,性能低下,如果涉及联合查询的情况,性能 ...

  3. spring-boot支持双数据源mysql+mongo

    这里,首先想说的是,现在的web应用,处理的数据对象,有结构化的,也有非结构化的.同时存在.但是在spring-boot操作数据库的时候,若是在properties文件中配置数据源的信息,通过默认配置 ...

  4. [转] Neutron FWaaS

    OpenStack Neutron FWaaS 学习 ( by quqi99 ) 作者:张华  发表于:2013-06-24 版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息 ...

  5. laravel5-目录结构分析

    laravel5-目录结构分析 (2016-01-21 11:24:03) 转载▼     一.环境配置: $ lsb_release -a No LSB modules are available. ...

  6. 【initrd】向虚拟文件系统initrd.img中添加驱动

    虚拟文件系统:initrd-2.6.18-194.el5.img 希望添加网卡或SCSI等驱动 步骤: 解压initrd-2.6.18-194.el5.img: 添加*.ko文件,并修改init可执行 ...

  7. 【Struts2学习笔记-3】常量配置

    Struts2常量 配置Struts2常量值有3个地方,1)在struts.properties文件中配置常量:2)在web.xml文件中配置FileterDispatcher指定初始化参数来配置常量 ...

  8. Redis资料汇总专题

    1.Redis是什么? 十五分钟介绍 Redis数据结构 Redis系统性介绍 一个很棒的Redis介绍PPT 强烈推荐!非同一般的Redis介绍 Redis之七种武器 锋利的Redis redis ...

  9. Saltstack系列5:Saltstack之pillar组件

    pillar组件 pillar也是Saltstack最重要的组件之一,其作用是定义与被控主机相关的任何数据,定义好的数据可以被其他组件使用,如模板.state.API等. 在pillar中定义的数据与 ...

  10. (C++) 基本面试题(整理)

    1.new.delete.malloc.free关系 new/delete是C++的运算符.new 调用构造函数用于动态申请内存,delete调用对象的析构函数,用于释放内存. malloc与free ...