zoukankan      html  css  js  c++  java
  • gc buffer busy/gcs log flush sync与log file sync

    https://blogs.oracle.com/askmaclean/entry/gc_buffer_busy_gcs_log?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+orana+%28OraNA%29

    http://t.askmaclean.com/thread-438-1-1.html

    gc current block busy 等待是RAC中global cache全局缓存当前块的争用等待事件, 该等待事件时长由三个部分组成:
    
    Time to process current block request in the cache= (pin time + flush time + send time)
    
    gc current block flush time
    The current block flush time is part of the service (or processing) time for a current block. The pending redo needs to be flushed to the log file by LGWR before LMS sends it. The operation is asynchronous in that LMS queues the request, posts LGWR, and continues processing. The LMS would check its log flush queue for completions and then send the block, or go to sleep and be posted by LGWR. The redo log write time and redo log sync time can influence the overall service time significantly.

    flush time 是Oracle为了保证Instance Recovery实例恢复机制,而要求每一个current block在本地节点local instance被修改后(modify/update) 必须要将该current block相关的redo 写入到logfile 后(要求LGWR必须完成写入后才能返回),才能由LMS进程传输给其他节点使用。

    gcs_log_flush.png

    gc buffer busy acquire/release 往往是 gc current block busy的衍生产品, 当同一实例内的 多个进程并发地访问同一个数据块时 , 首先发起的进程 将进入 gc current block busy的等待 ,而在 buffer waiter list 上的后续进程 会陷入gc buffer busy acquire/release 等待(A user on the same instance has started a remote operation on the same resource and the request has not completed yet or the block was requested by another node and the block has not been released by the local instance when the new local access was made), 这里存在一个排队效应, 即 gc current block busy是缓慢的,那么在 排队的gc buffer busy acquire/release就会更慢:

    Pin time = (time to read the block into cache) + (time to modify/process the buffer)
    Busy time = (average pin time) * (number of interested users waiting ahead of me)
    
    不局限于current block (reference AWR Avg global cache current block flush time (ms)),  cr block(Avg global cache cr block flush time (ms)) 也存在flush time。
    
    可以通过 设置_cr_server_log_flush to false(LMS are/is waiting for LGWR to flush the pending redo during CR fabrication. Without going too much in to details, you can turn off the behaviour by setting   _cr_server_log_flush to false.) 来禁止cr server flush redo log,但是该参数对于current block的flush time无效, 也强烈不推荐使用。

    以上告诉我们 IO 在RAC中是十分重要的,特别是log file的write性能, 其重要性不亚于CPU 和 Interconnect network。

    log file sync with gc buffer busy acquire release

    Avg global cache current block flush time (ms)

    gcs log flush sync

    Oracle、Linux、Unix
  • 相关阅读:
    【原】相煎何太急——input的blur事件与button的click事件
    【原】jQuery与CSS自动生成验证码
    【转】HTML转义字符大全
    【原】来自于一位前端“布道者”的建议
    【原】如何在jQuery中实现闭包
    【转】Web前端研发工程师编程能力飞升之路
    【原】git如何删除本地和远程的仓库
    H5不同样式新闻垂直滚动效果
    mui防止软键盘弹起方法
    js显示对象所有属性和方法的函数
  • 原文地址:https://www.cnblogs.com/taowang2016/p/3037228.html
Copyright © 2011-2022 走看看