广告
返回顶部
首页 > 资讯 > 数据库 >Oracle local write wait等待事件
  • 433
分享到

Oracle local write wait等待事件

2024-04-02 19:04:59 433人浏览 八月长安
摘要

Note 1:         TypicallyDBWR has to free up some buffers when

Note 1:

         TypicallyDBWR has to free up some buffers when you want to read something from the disk.During this process there are chances that you will be waiting for your local buffer(i.e blocks dirtied/invalidated by your session) to be written to disk. Duringthis time the waits are shown as local write waits.

当你想从此盘读取数据,DBDW不得不清空一些buffer。在此过程中,可能会遇到等待你本地buffer写入磁盘(如脏块、失效的块)。

Note 2:

         Basically  'localwrite' wait happens (as the name indicates) when the session is waiting for itslocal (means writes pending because of its own operation)  write operation.This could happen typically if the underlying disc has some serious problems(one of the member disk crash in RAID-05 - for example, or a controllerfailure). That is why I might have said ' you never see this wait in the nORMaldatabases!'.  You may see this during (rarely) Truncating a largetable while most of the buffers of that table in cache. During TRUNCATEs thesession has to a local checkpoint and during this process, the session may waitfor 'local write' wait.

         基本上'localwrite' wait 表示会话在等待自己的写操作。在磁盘发生严重问题时会发生(例如RAID 5的一个磁盘崩溃,或者磁盘控制器错误),这在正常的系统中极少发生,在TRUNCATE 一个大表而这个表在缓存中的时候,会话必需进行一个local checkpoint,这个时候会话会等待local session wait.

 

在MOS 的文档:

Truncates Taking Too Long... [ID334822.1]

提到了这个等待事件。

 

1          Cause

Processes that involve temporary tablesbeing truncated and repopulated in multiple, concurrent batch streams maypresent this situation.

涉及到临时表被以并发多路并行形式truncate和repopulate,可能会出现此类情况。

The underlying problem is we have to writethe object's dirty buffers to disk prior to actually truncating or dropping theobject. This ensures instance recoverability and avoids a stuck recovery. Itseems at first glance perfectly reasonable to simply truncate a temporarytable, then repopulate for another usage. And then to do the temporarypoplulate/truncate operations in concurrent batches to increase throughput.

However, in reality the concurrenttruncates get bogged down as dbwr gets busy flushing those dirty block buffersfrom the buffer cache. You will see huge CI enqueue waits. The multipletruncate operations in concurrent streams absolutely kill throughput. This isspecially critical with large buffers.

 

2          Solution

         In9.2.0.5 and higher, it may also help to make sure a "temp"table that is frequently truncated have storage defined so that itoccupies one extent. But this workaround is only available as long as theextent is no more than 50% the size of the buffer cache. In non-RACenvironments the table still has to be smaller than 50% of the buffercache, but it allows the table to have up to 5 extents before falling backto the old alGorithm. 

 

另外个例子(from internet):

一个数据仓库的系统,在AWR报告中出现靠前的等待时间为LOCAL WRITE WAIT和Eq:RO Fast Object Reuse. 分析相关的语句为TRUNCATE一个中间表。RO队列的意义可以从V$LOCK_TYPE中检索到。

sql> SELECT DESCRIPTION FROM V$LOCK_TYPE WHERE TYPE='RO';

DESCRIPTION

--------------------------------------------------------------------------------

Coordinates flushing of multiple objects

字面上的意思是协调清空多个对象。分析应用,该语句发生在ETL过程中,主要步骤为填充中间表,修改中间表,TRUNCATE中间表。在调度程序中有较多该流程的过程 .

       在TRUNCATE 和DROP TABLE的时候, oracle必须使DATA BUFFER中所有该对象的数据块失效或者刷新到磁盘,步骤为此时请求RO队列,找缓冲区中该对象的块,并使其无效化或者刷新到磁盘,然后释放RO锁,如果多个进程并发地进行TRUNCATE的时候,就会在RO队列上发生竞争,表现为等待事件Eq: RO fast object reuse. 如果TRUNCATE等待相关的块刷新到磁盘,就表现为等待时间local write wait.

      这个问题的发生有两个原因:1 I/O慢2 并行TRUNCATE.

      该问题不能通过增大BUFFER CACHE来解决,BUFFER CACHE 愈大,搜寻相关数据块的时间愈长。

      处理的方法

1  可以对这种类型的中间表使用非默认块大小的表空间,在CACHE BUFFER中设定不同块大小的缓冲区。减小搜寻相关数据块的时间,降低竞争。

2 保证DBWn写入的效率。


您可能感兴趣的文档:

--结束END--

本文标题: Oracle local write wait等待事件

本文链接: https://www.lsjlt.com/news/34660.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • Oracle local write wait等待事件
    Note 1:         TypicallyDBWR has to free up some buffers when ...
    99+
    2022-10-18
  • Oracle 等待事件(Wait Event):Sync ASM rebalance 解析
    摘要:在 Oracle 数据库中,经常可以见到一个特殊的等待事件:Sync ASM rebalance 。这个等待事件的基本含义是:在集群中,通过同步 ASM 的重平衡变化,以使得 ASM 的变更在集群之...
    99+
    2022-10-18
  • ORACLE的buffer busy wait等待事件怎么解决
    本文小编为大家详细介绍“ORACLE的buffer busy wait等待事件怎么解决”,内容详细,步骤清晰,细节处理妥当,希望这篇“ORACLE的buffer busy wait等待事件怎么解决”文章能帮...
    99+
    2022-10-19
  • 分析ARCH wait on SENDREQ等待事件
    本篇内容介绍了“分析ARCH wait on SENDREQ等待事件”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学...
    99+
    2022-10-18
  • Oracle Study之--Oracle等待事件(5)
    Oracle Study之--Oracle等待事件(5) Db file single write这个等待事件通常只发生在一种情况下,就是Oracle 更新数据文件头信息时(比如发生Checkpo...
    99+
    2022-10-18
  • Oracle Study之--Oracle等待事件(3)
    Oracle Study之--Oracle等待事件(3)Db file parallel read这是一个很容易引起误导的等待事件,实际上这个等待事件和并行操作(比如并行查询,并行DML)没有关系。 这个事...
    99+
    2022-10-18
  • Oracle Study之--Oracle等待事件(4)
    Oracle Study之--Oracle等待事件(4) Db file scattered read这个等待事件在实际生产库中经常可以看到,这是一个用户操作引起的等待事件,当用户发出每次I/O需...
    99+
    2022-10-18
  • Oracle Study之--Oracle等待事件(2)
    Oracle Study之--Oracle等待事件(2)Control file parallel write当数据库中有多个控制文件的拷贝时,Oracle 需要保证信息同步地写到各个控制文件当中,这是一个...
    99+
    2022-10-18
  • Oracle Study之--Oracle等待事件(7)
    Oracle Study之--Oracle等待事件(7) Free buffer waits    当一个会话将数据块从磁盘读到内存中时,它需要到内存中找到空闲的内存空间来存放...
    99+
    2022-10-18
  • oracle等待事件之enq: CF – contentio
    Enqueue 是一种保护共享资源的锁定机制,避免因并发操作而损坏数据,Enqueue 采用排队机制,即 FIFO(先进先出)来控制资源的使用。在任何需要读取控制文件的动作时,就会发生等待事件enq: CF...
    99+
    2022-10-18
  • Oracle 等待事件之 free buffer waits
    free buffer waits官网解释:    This wait event indicates that a server process was unabl...
    99+
    2022-10-18
  • Oracle 等待事件之 buffer busy waits
    buffer busy waits (热块儿争用)官网解释:    This wait indicates that there are some buffers i...
    99+
    2022-10-18
  • Oracle等待事件之enq: TM – contention
    执行DML 期间,为防止对与DML 相关的对象进行修改,执行DML 的进程必须对该表获得TM 锁。 P1 = name|mode P2 = object # P3 = table/partition ...
    99+
    2022-10-18
  • oracle等待事件之free buffer waits
    1.什么时候会发生free buffer waits呢?     简单来说,当需要在buffer cache中寻找可用块但是找不到时,就会发生这个等待。找寻可用块的理由包括...
    99+
    2022-10-18
  • Oracle中有哪些等待事件
    这篇文章给大家介绍Oracle中有哪些等待事件,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。1. Buffer busy waits从本质上讲,这个等待事件的产生仅说明了一个会话在等待...
    99+
    2022-10-18
  • Oracle Study之-- enq:SQ contention等待事件
    Oracle Study之-- enq:SQ contention等待事件通过AWR Report发现“enq:SQ contention”等待事件:应用环境:转自:http://www.xuebuyuan...
    99+
    2022-10-18
  • Oracle Study之--resmgr:cpu quantum等待事件
    Oracle Study之--resmgr:cpu quantum等待事件在AWR Report中出现“resmgr:cpu quantum”等待事件:“resmgr:cpu quantum”等待事件:参考...
    99+
    2022-10-18
  • Oracle Study中Oracle等待事件怎么用
    这篇文章主要为大家展示了“Oracle Study中Oracle等待事件怎么用”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“Oracle Study中Oracl...
    99+
    2022-10-19
  • Oracle面试宝典-等待事件篇
    Oracle 面试宝典 - 等待事件篇 请问Oracle 数据库中等待事件的作用是什么 一、等待事件由来 因为指标体系的发展,才导致等待事件的引入。总结一下,Oracle 的指标体系...
    99+
    2022-11-30
    oracle 事件 宝典
  • Oracle 等待事件之 db file sequential read
    db file sequential read:官网解释:This event signifies that the user process is reading a buffer into the SG...
    99+
    2022-10-18
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作