人生如炼狱,不得不修行
日历
网志分类
· 所有网志 (147)
· 古玩 (1)
· 财务知识 (1)
· 心情故事 (47)
· 英语学习 (7)
· Oracle - 问题解决 (17)
· Oracle - 其它 (1)
· Oracle - 性能优化 (24)
· Oracle - 架构 (8)
· Oracle - 概念 (14)
· Unix (19)
· Oracle - 等待事件 (8)
站内搜索
友情链接
· 歪酷博客
· 我的歪酷 非非共享界
· 八卦乾坤
· 桃花盛开的地方
· 沉默寡言的美

订阅 RSS

0017550

歪酷博客

机遇像个小偷,到来时无声无息,走时你却损失惨重
« 上一篇: 关于parallel 选项的整理 下一篇: Library cache latch 竞争的解决 »
carsoncheng @ 2006-05-14 14:29

  • buffer busy wait 与 free buffer wait 的区别在于:前者指的是多个session对于同一个block的读取竞争;后者指的是,在buffer cache中,LRU列表中已经没有了空闲buffer space来接纳新的block信息。一般而言,发生buffer busy wait是由于:
           1.   The block is being read into the buffer by another session, so the waiting session must wait for the block read to complete.     等待另外一个session读取动作的完成
           2.   Another session has the buffer block locked in a mode that is incompatible with the waiting session's request.
                 另外一个session已经对buffer block上锁
  • buffer busy wait 有3个parameter:p1 代表文件号,p2代表block号,P3代表reason code
  • 根据p1 和p2 ,我们执行以下查询:
    select owner, segment_name, segment_type
    from dba_extents
    where file_id = &P1 and &P2 between block_id and block_id + blocks -1;
    再根据v$segment_statistics来确定相关segment 的统计信息
  • P3 代表reason code,该值的具体意义表示如下:
    Code
     
    Reason for wait
    - A modification is happening on a SCUR or XCUR buffer but has not yet completed.
    0 The block is being read into the buffer cache.
    100 We want to NEW the block, but the block is currently being read by another session (most likely for undo).
    110 We want the CURRENT block either shared or exclusive but the block is being read into cache by another session, so we have to wait until its read() is completed.
    120 We want to get the block in current mode, but someone else is currently reading it into the cache. Wait for the user to complete the read. This occurs during buffer lookup.
    130 Block is being read by another session, and no other suitable block image was found, so we wait until the read is completed. This may also occur after a buffer cache assumed deadlock. The kernel can't get a buffer in a certain amount of time and assumes a deadlock. Therefore it will read the CR version of the block.
    200 We want to NEW the block, but someone else is using the current copy, so we have to wait for that user to finish.
    210 The session wants the block in SCUR or XCUR mode. If this is a buffer exchange or the session is in discrete TX mode, the session waits for the first time and the second time escalates the block as a deadlock, so does not show up as waiting very long. In this case, the statistic: "exchange deadlocks" is incremented, and we yield the CPU for the "buffer deadlock" wait event.
    220 During buffer lookup for a CURRENT copy of a buffer, we have found the buffer but someone holds it in an incompatible mode, so we have to wait.
    230 Trying to get a buffer in CR/CRX mode, but a modification has started on the buffer that has not yet been completed.
    231 CR/CRX scan found the CURRENT block, but a modification has started on the buffer that has not yet been completed.
  • 解决办法:
    1、 发现hot block,改变pctused 和pctfree,使得一个block 中可以容纳更多得数据
    2、 增加freelist group 和 freelist
    3、 增加一定数量的回滚段



评论 / 个人网页 / 扔小纸条
* 昵称

已经注册过? 请登录

新用户请先注册 以便能显示头像及追踪评论回复

Email
网址
* 评论
表情
 


 

分类小组论坛
杂谈 , 娱乐、八卦 , 文学、艺术 , 体育 , 旅游、同城 , 象牙塔 , 情感 , 时尚、生活 , 星座 , 科技

请注意遵守中华人民共和国法律法规, 如威胁到本站生存, 将依法向有关部门报告, 同时本站的相关记录可能成为对您不利的证据.

相关法律法规
全国人大常委会关于维护互联网安全的决定
中华人民共和国计算机信息系统安全保护条例
中华人民共和国计算机信息网络国际联网管理暂行规定
计算机信息网络国际联网安全保护管理办法
计算机信息系统国际联网保密管理规定