WAITEVENT: "library cache: mutex X" (文档 ID 727400.1)

WAITEVENT: "library cache:
mutex X" (文档 ID 727400.1)

2014-01-19 09:56 2367人阅读 评论(0) 收藏 举报

 分类:

网络资源_ORACLE_调优(108) 

目录(?)[-]

  1. APPLIES TO
  2. PURPOSE
  3. SCOPE
  4. DETAILS
    1. Definition
    2. Individual Waits
    3. Systemwide Waits
    4. Wait Time
    5. Reducing Waits Wait times
    6. Known Bugs
  5. REFERENCES
  6. 相关内容
    1. 产品
    2. 关键字
    3. 错误

In this Document

  Purpose
  Scope
  Details
  Definition:
  Individual
Waits:
  Systemwide
Waits:
  Wait
Time:
  Reducing
Waits / Wait times:
  Known
Bugs:
  References

APPLIES TO:

Oracle Database - Personal Edition - Version 11.1.0.6 to 11.2.0.3 [Release 11.1 to 11.2]

Oracle Database - Standard Edition - Version 11.1.0.6 to 11.2.0.3 [Release 11.1 to 11.2]

Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.2.0.3 [Release 11.1 to 11.2]

Information in this document applies to any platform.

PURPOSE

This document explains the meaning of the wait event "library cache: mutex" and gives hints on how it may be used to diagnose performance problems.

SCOPE

This is intended for DBAs and developers who are involved with tuning their database. An intermediate level of expertise is required.

DETAILS

This is a reference note for the wait event "library cache: mutex X" which includes the following subsections:

See Note 61998.1 for an introduction to Wait Events.

Definition:

  • @Source Symbol:kglmwexc Versions:11.0 - Documentation:None
  • The library cache mutex is acquired for similar purposes that the library cache latches were acquired in prior versions of Oracle. In 10g, mutexes were introduced for certain operations in the library cache.  Starting with
    11g, the library cache latches were replaced by mutexes, hence this new wait event.
  • Mutexes are a lighter-weight and more granular concurrency mechanism than latches. Mutexes take advantage of CPU architectures that offer the compare and swap instructions (or similar). The reason for obtaining a mutex in
    the first place, is to ensure that certain operations are properly managed for concurrency. E.g., if one session is changing a data structure in memory, then another session must wait to acquire the mutex before it can make a similar change - this prevents
    unintended changes that would lead to corruptions or crashes if not serialized.
  • This wait event is present whenever a library cache mutex is held in exclusive mode by a session and other sessions need to wait for it to be released.  There are many different operations in the library cache that will require
    a mutex, so its important to recognize which "location" (in Oracle‘s code) is involved in the wait.  "Location" is useful to Oracle Support engineers for diagnosing the cause for this wait event.

Individual Waits:

Parameters:

    • P1 = "idn" = Unique Mutex Identifier
    • P2 = Mutex "value" = in order to find the mutex value, read note 1298015.1
    • P3 = "where" = location in code (internal identifier) where mutex is being waited for

    Systemwide Waits:

    At a systemwide level, there are two views which will help diagnose this wait:

    GV$MUTEX_SLEEP (or V$MUTEX_SLEEP for non-RAC)

    and GV$MUTEX_SLEEP_HISTORY (or V$MUTEX_SLEEP_HISTORY for non-RAC)

    These views track the instance wide usage of mutexes since instance startup.  Since these views show values that are total values since startup, they are most meaningful when you obtain the difference in values during a short time interval when there was problem. 
    The easiest way to see this information is through an AWR or statspack report in the "Mutex Sleep Summary" section.

    Wait Time:

    The waiter waits very briefly before timing out.  It is typical to see 100% timeouts for this wait.

    Reducing Waits / Wait times:

    The cause for waits will be very specific to a particular library cache object since mutexes are very granular now compared to the old library cache latches. Generally, excessive waits are caused by frequent pinning and unpinning of cursors or objects; this
    document will be updated as other causes are encountered.

    Known Bugs:

    Known Bugs

    You can restrict the list below to issues likely to affect one of the following versions by clicking the relevant button:

    NB Bug Fixed Description
      17588480 12.1.0.2, 12.2.0.0 library cache mutex/shared pool latch deadlock
      16232803 11.2.0.4, 12.1.0.2, 12.2.0.0 Library cache lock / mutex contention with fix 8508078 enabled
      14401731 11.2.0.3.BP20, 11.2.0.4, 12.1.0.1 Cursor leak using "SET TRANSACTION" within PLSQL
      16864042 11.2.0.4, 12.2.0.0 Unnecessary library cache operations for DDLs on partitions in exadata
      16400122 12.2.0.0 Spikes in library cache mutex contention for SQL using SQL Plan Baseline
      15858022 11.2.0.4, 12.2.0.0 Frequent invalidation of tuning objects with VPD
      13810393 11.2.0.2.10, 11.2.0.2.BP20, 11.2.0.3.6, 11.2.0.3.BP15, 11.2.0.4, 12.1.0.1 Deadlock waiting for ‘library cache: mutex x‘ while producing an ORA-4031 diagnostic dump
      13720753 11.2.0.4, 12.1.0.1 Diagnosability issue - mutex wait "idn" value truncated in session wait output in tracefile
      13588248 11.2.0.2.BP17, 11.2.0.3.3, 11.2.0.3.BP06, 11.2.0.4, 12.1.0.1 "library cache: mutex X" contention for objects with very many library cache locks
      12976376 11.2.0.2.6, 11.2.0.2.BP16, 11.2.0.3.3, 11.2.0.3.BP05, 12.1.0.1 High VERSION_COUNT for SQL with binds, including recursive dictionary SQL - superseded
      12797420 11.2.0.2.11, 11.2.0.2.BP21, 11.2.0.3.3, 11.2.0.3.BP07, 11.2.0.4, 12.1.0.1 "library cache: mutex X" waits on DB instance handle with CURSOR_SHARING
      11818335 11.1.0.7.9, 11.2.0.2.2, 11.2.0.2.BP06, 11.2.0.3, 12.1.0.1 Additional support for bug 10411618 to allow dynamic Mutex wait scheme changes
      11719151 11.2.0.3, 12.1.0.1 SQL Plan Management capture causes slowness
      10632113 11.2.0.3, 12.1.0.1 OLS calls cause mutex contention even with low number of concurrent users
      10417716 11.2.0.2.5, 11.2.0.2.BP05, 11.2.0.2.GIPSU05, 11.2.0.3, 12.1.0.1 Mutex X waits in 11G on an instance with heavy JAVA usage
      10284845 11.2.0.3, 12.1.0.1 Need index on SID for X$KGLLK and X$KGLPN based views (V$OPEN_CURSOR etc..)
      10284838 11.2.0.2.5, 11.2.0.2.BP13, 11.2.0.2.GIPSU05, 11.2.0.3, 12.1.0.1 Cache line contention while waiting for mutexes
      10204505 11.2.0.3, 12.1.0.1 SGA autotune can cause row cache misses, library cache reloads and parsing
      10086843 11.2.0.3, 12.1.0.1 Recursive SQL cursors not reused - PMON crashes instance with ORA-600 [kglLockOwnersListDelete]
      9530750 11.2.0.2, 12.1.0.1 High waits for ‘library cache: mutex X‘ for cursor Build lock
      9239863 11.2.0.1.BP06, 11.2.0.2, 12.1.0.1 Excessive "library cache:mutex X" contention on hot objects
      8981059 11.1.0.7.4, 11.2.0.1.2, 11.2.0.1.BP06, 11.2.0.2, 12.1.0.1 High Version Count (due to USER_BIND_PEEK_MISMATCH) with bind peeking
      8860198 11.2.0.2, 12.1.0.1 "library cache:mutex X" waits using XMLType
      7352775 11.2.0.2, 12.1.0.1 Many child cursors when PARALLEL_INSTANCE_GROUP set wrong
      12670165 11.2.0.2.4, 11.2.0.2.BP12, 11.2.0.3 Library cache mutex contention caused by lookup of triggers
      12633340 11.2.0.2.6, 11.2.0.2.BP13, 11.2.0.3 Heavy "library cache lock" and "library cache: mutex X" contention for a "$BUILD$.xx" lock
      8793492 10.2.0.5, 11.2.0.1.BP07, 11.2.0.2 Mutex Waits with Resource Manager
      10145558 11.1.0.7.7, 11.2.0.1.BP12, 11.2.0.2 Selects on library cache V$/X$ views cause "library cache: mutex X" waits
      9398685 11.2.0.2 High "library cache: mutex X" when using Application Context
      9282521 11.2.0.2 Excessive "library cache:mutex X" contention on hot objects
      9140262 11.2.0.2 ORA-600 [ksliwat5] followed by cpu spike/"library cache: mutex X" Waits
      9003145 11.2.0.1.BP03, 11.2.0.2 Dump (kglIsOwnerVersionable) / "library cache: mutex X" waits
      7502237 11.1.0.7.7, 11.2.0.1 Unnecessary "library cache: mutex X" waits using stored Java
      7307972 11.1.0.7.2, 11.2.0.1 Excessive waits on ‘library cache: mutex x‘
      8431767   High "library cache: mutex X" when using Application Context
      9312879 11.1.0.7.7, 11.2.0.1 "library cache: mutex x" waits after killing sessions / PMON slow to clean up
      7648406 10.2.0.5, 11.1.0.7.4, 11.2.0.1 Child cursors not shared for "table_..." cursors (that show as "SQL Text Not Available") when NLS_LENGTH_SEMANTICS = CHAR
      7155860 11.2.0.1 Spin on kgllkde causes ‘library cache: mutex X‘
      8499043 11.1.0.7.2 SET_CONTEXT incurs unnecessary DLM overhead in RAC
      5928271 11.1.0.7 Excessive waits on "library cache: mutex X"
      7317117 11.2.0.1 Unnecessary "library cache: mutex X" waits on LOB operations
    • ‘*‘ indicates that an alert exists for that issue.
    • ‘+‘ indicates a particularly notable issue / bug.
    • ‘I‘ indicates an install issue / bug included for completeness.
    • ‘P‘ indicates a port specific bug.
    • Fixed versions use "BPnn" to indicate Exadata bundle nn.
    • "OERI:xxxx" may be used as shorthand for ORA-600 [xxxx].


    Another important fix to keep in mind is:

    bug:10411618 
    ADD DIFFERENT WAIT SCHEMES FOR MUTEX WAITS

    There are 3 parameters to control the mutex waits, which can be set dynamically and are only allowed to be set by "alter system set"

    * _mutex_spin_count (Integer) - This sets the number of times to spin before yielding/waiting.

    * _mutex_wait_time (Integer) - This sets the amount of time in milli seconds to wait or the maximum amount of time to sleep for exponential backoff

    * _mutex_wait_scheme (Integer) - This controls which wait scheme to use. It can be set to one of the three wait schemes described above.

    o _mutex_wait_scheme = 0 - Always YIELD

    o _mutex_wait_scheme = 1 & _mutex_wait_time = t - Always SLEEP for t ms

    o _mutex_wait_scheme = 2 & _mutex_wait_time = t - EXP BACKOFF with maximum sleep time set to t ms.

    The default in MAIN & the backports is set to exponential backoff with the maximum wait time set to 1 ms. The old default behaviour was mostly yield. So after applying the patch if we need to revert to old behaviour, _mutex_wait_scheme should be set to 0.

    REFERENCES

    NOTE:5928271.8 - Bug 5928271 - Excessive waits on "library
    cache: mutex X"

    NOTE:7155860.8 - Bug 7155860 - Spin on kgllkde causes ‘library
    cache: mutex X‘

    NOTE:7307972.8 - Bug 7307972 - Excessive waits on ‘library
    cache: mutex x‘

    NOTE:7317117.8 - Bug 7317117 - Unnecessary "library cache:
    mutex X" waits on LOB operations

    NOTE:7648406.8 - Bug 7648406 - Child cursors not shared
    for "table_..." cursors (that show as "SQL Text Not Available") when NLS_LENGTH_SEMANTICS = CHAR

    NOTE:8431767.8 - Bug 8431767 - High "library cache: mutex
    X" when using Application Context

    NOTE:8499043.8 - Bug 8499043 - SET_CONTEXT incurs unnecessary
    DLM overhead in RAC

    NOTE:8793492.8 - Bug 8793492 - Mutex Waits with Resource
    Manager

    NOTE:8860198.8 - Bug 8860198 - "library cache:mutex X"
    waits using XMLType

    NOTE:8981059.8 - Bug 8981059 - High Version Count (due
    to USER_BIND_PEEK_MISMATCH) with bind peeking

    NOTE:9003145.8 - Bug 9003145 - Dump (kglIsOwnerVersionable)
    / "library cache: mutex X" waits

    NOTE:9140262.8 - Bug 9140262 - ORA-600 [ksliwat5] followed
    by cpu spike/"library cache: mutex X" Waits

    NOTE:9239863.8 - Bug 9239863 - Excessive "library cache:mutex
    X" contention on hot objects

    NOTE:9282521.8 - Bug 9282521 - Excessive "library cache:mutex
    X" contention on hot objects

    NOTE:9312879.8 - Bug 9312879 - "library cache: mutex x"
    waits after killing sessions / PMON slow to clean up

    NOTE:9398685.8 - Bug 9398685 - High "library cache: mutex
    X" when using Application Context

    NOTE:9530750.8 - Bug 9530750 - High waits for ‘library
    cache: mutex X‘ for cursor Build lock

    BUG:10411618 - ADD DIFFERENT WAIT SCHEMES FOR MUTEX WAITS

    NOTE:7502237.8 - Bug 7502237 - Unnecessary "library cache:
    mutex X" waits using stored Java

    NOTE:11719151.8 - Bug 11719151 - SQL Plan Management capture
    causes slowness

    NOTE:11818335.8 - Bug 11818335 - Additional support for
    bug 10411618 to allow dynamic Mutex wait scheme changes

    NOTE:12633340.8 - Bug 12633340 - Heavy "library cache
    lock" and "library cache: mutex X" contention for a "$BUILD$.xx" lock

    NOTE:12670165.8 - Bug 12670165 - Library cache mutex contention
    caused by lookup of triggers

    NOTE:12797420.8 - Bug 12797420 - "library cache: mutex
    X" waits on DB instance handle with CURSOR_SHARING

    NOTE:12976376.8 - Bug 12976376 - High VERSION_COUNT for
    SQL with binds, including recursive dictionary SQL - superseded

    NOTE:13588248.8 - Bug 13588248 - "library cache: mutex
    X" contention for objects with very many library cache locks

    NOTE:10086843.8 - Bug 10086843 - Recursive SQL cursors
    not reused - PMON crashes instance with ORA-600 [kglLockOwnersListDelete]

    NOTE:10145558.8 - Bug 10145558 - Selects on library cache
    V$/X$ views cause "library cache: mutex X" waits

    NOTE:10204505.8 - Bug 10204505 - SGA autotune can cause
    row cache misses, library cache reloads and parsing

    NOTE:7352775.8 - Bug 7352775 - Many child cursors when
    PARALLEL_INSTANCE_GROUP set wrong

    NOTE:10284845.8 - Bug 10284845 - Need index on SID for
    X$KGLLK and X$KGLPN based views (V$OPEN_CURSOR etc..)

    NOTE:10417716.8 - Bug 10417716 - Mutex X waits in 11G
    on an instance with heavy JAVA usage

    NOTE:10632113.8 - Bug 10632113 - OLS calls cause mutex
    contention even with low number of concurrent users

 
 

相关内容

   
 
 

产品

   
 
 

关键字

   
 

BUGTAG_ADDBUGS

 

错误

   
 

KGLLOCKOWNERSLISTDELETE;KSLIWAT5;ORA-600
[KGLLOCKOWNERSLISTDELETE]
;ORA-600
[KSLIWAT5]
;ORA-600
[NNNNN]
;ORA-600
[POOL]
;ORA-600
[XXXX]

时间: 2024-10-17 13:09:32

WAITEVENT: "library cache: mutex X" (文档 ID 727400.1)的相关文章

Troubleshooting 'library cache: mutex X' waits. (文档 ID 1357946.1)

In this Document   Purpose   Troubleshooting Steps   What is a 'library cache: mutex X' wait?   What causes 'library cache: mutex X' wait?   How to diagnose the cause.   How to Examine the Diagnostics.   Potential Solutions   References APPLIES TO: O

Rolling Cursor Invalidations with DBMS_STATS.AUTO_INVALIDATE (文档 ID 557661.1)

  Rolling Cursor Invalidations with DBMS_STATS.AUTO_INVALIDATE (文档 ID 557661.1) 转到底部 In this Document   Purpose   Scope   Details   Cursor Invalidations on Gathering Statistics prior to Oracle10g   Cursor Invalidations with Oracle10g and AUTO_INVALID

PRVF-4664 PRVF-4657: Found inconsistent name resolution entries for SCAN name (文档 ID 887471.1)  

In this Document Applies to: Oracle Server - Enterprise Edition - Version 11.2.0.1 to 11.2.0.3 [Release 11.2]Information  in this document applies to any platform. Purpose runInstaller (OUI) reports INS-20802 while running Oracle Cluster Verification

How to Analyze Problems Related to Internal Errors (ORA-600) and Core Dumps (ORA-7445) using My Oracle Support (文档 ID 260459.1)

Oracle Database - Enterprise Edition - Version 8.1.7.4 and later Information in this document applies to any platform. **Checked for relevance 06-Apr-2010 **Checked for relevance 17-Apr-2013 *** Checked for relevance on 16-Nov-2011 *** Purpose 1.1 Ab

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

业务系统数据库夯住,数据库内大量的library cache: mutex X及latch: shared pool等待,alert日志信息如下 Tue Sep 26 22:10:04 2017 WARNING: inbound connection timed out (ORA-3136) Tue Sep 26 22:10:04 2017 WARNING: inbound connection timed out (ORA-3136) Tue Sep 26 22:10:04 2017 WARN

How to Create an OCM Response file to Apply a Patch (文档 ID 966023.1)

How to Create an OCM Response file to Apply a Patch in Silent Mode - opatch silent (文档 ID 966023.1) APPLIES TO: Oracle Universal Installer - Version 10.2.0.1 to 11.2.0.4 [Release 10.2 to 11.2]Oracle Database - Enterprise Edition - Version 10.2.0.1 to

How to Send an Email Using UTL_SMTP with Authenticated Mail Server. (文档 ID 885522.1)

APPLIES TO: PL/SQL - Version 9.2.0.1 to 12.1.0.1 [Release 9.2 to 12.1]Information in this document applies to any platform.***Checked for relevance on 07-Apr-2014*** GOAL The UTL_SMTP package is designed for sending electronic mails (emails) over Sim

AIO on AIX 6.1 (文档 ID 1328019.1)

最近在AIO 6.1与SF环境中遇到了AIO的问题,下面是MOS中关于AIO 在6.1下的一般变化说明   欢迎大家加入ORACLE超级群:17115662 免费解决各种ORACLE问题,以后BLOG将迁移到http://www.htz.pw   修改时间:2014-5-6 类型:HOWTO In this Document Goal Fix AIO on AIX 6.1 (文档 ID 1328019.1)   修改时间:2014-5-6 类型:HOWTO   In this Document

11i - 12 Gather Schema Statistics fails with Ora-20001 errors after 11G database Upgrade (文档 ID 781813.1)

11i - 12 Gather Schema Statistics fails with Ora-20001 errors after 11G database Upgrade (文档 ID 781813.1) 转到底部 In this Document   Symptoms   Changes   Cause   Solution APPLIES TO: Oracle Applications Technology Stack - Version 11.5.10.2 to 12.1.3 [Re