zoukankan      html  css  js  c++  java
  • Buffer Cache Management

    Oracle creates server processes to handle requests from connected user processes. A server process communicates with the user process and interacts with Oracle to carry out requests from the associated user process. For example, if a user queries some data not already in the database buffers of the SGA, then the associated server process reads the proper data blocks from the datafiles into the SGA. –<<10gR2 Concept>>

    First, Buffer Cache Management Process
    Oracle Server Process scan Cache Buffer Chain (Cache Buffer Chain latch) to see if the block(s) has been cached in Hash Chain, if the cached block(s) can be found, the position of the block’s BH(s) will be move on LRU List (Cache Buffer LRU Chain latch), if not exist then scan disk.
    Beford scanning disk, Server Process need to scan LRU List for a free buffer(s) to store the BH of target Block(s), in the mean time, Server Process will move all the Dirty Buffer Block(s) (flag=dirty) from LRU List to Write List(Cache Buffer LRU Chain latch) (If Server Process couldn’t find free buffer after scaned 40% of LRU List, Server Process will call DBWn to write dirty data to release buffer①)
    To store block(s) after Server Process has enough buffer (Cache Buffer Chain latch & Cache Buffer LRU Chain latch), if the block cann’t make the rule of Consistent Read, Server Process need to create before image(s).
    When the block(s) in Buffer Cache became dirty, the block(s) must on LRU List, also Server Process will add the block(s) on Checkpoint Queue List as well(if there are 25% dirty block of Checkpoint Queue List Server Process will call DBWn to write those Dirty Block to Data File②x$kvit.kvittag=’kcbldq’ is 25%)
    DBWn scan 25% of LRU, and move those Dirty Buffer to Write List③ (?or to Checkpoint Queue List?)
    Second, the 5 lists
    LRU List:
    LRU Auxiliary List
    Write List (Dirty List)
    Write Auxiliary List
    Checkpoint Queue List
    Reference
    ①:The threshold for calling DBWn to write those Dirty Block to Data File
    select kvittag,kvitval,kvitdsc from x$kvit where kvittag=’kcbfsp’;
    KVITTAG    KVITVAL KVITDSC
    ——- ———- —————————————————————-
    kcbfsp         40  Max percentage of LRU list foreground can scan for free
    ②:The threshold for calling DBWn to write Dirty Block is 25%
    select kvittag,kvitval,kvitdsc from x$kvit where kvittag=’kcbldq’;
    KVITTAG    KVITVAL KVITDSC
    ——- ———- —————————————————————-
    kcbldq          25 large dirty queue if kcbclw reaches this
    ③: DBWn scan 25% of LRU, and move those Dirty Buffer to Dirty List
    select kvittag,kvitval,kvitdsc from x$kvit where kvittag=’kcbdsp’;
    KVITTAG    KVITVAL KVITDSC
    ——- ———- —————————————————————-
    kcbdsp         25  Max percentage of LRU list dbwriter can scan for dirty

    If you'd like to check all the Queues that I mentioned in this note, please go for alter session set events 'immediate trace name buffers level 10'; 

    to myself:check《Internal基础03-checkpoint》for details

    –EOF–

  • 相关阅读:
    windows补丁更新列表
    centos7网卡配置vlan
    exp备份工具使用说明
    windows系统SSL/TLS漏洞修复
    CDH平台:ZooKeeper 未授权访问【原理扫描】漏洞修复
    MySQL升级至5.7.35问题处理过程
    10fb does not support flow control autoneg问题处理
    vCenter异常日志:pg_tblspc找不到数据文件
    tcpdump命令
    排序算法总结
  • 原文地址:https://www.cnblogs.com/buro79xxd/p/1821237.html
Copyright © 2011-2022 走看看