• redo buffer大小


    转载自http://blog.csdn.net/robinson1988/article/details/4729858

     

    log buffer 是SGA中一块循环使用的内存区域,它一般很小,因为有4个条件能够触发log buffer 中的redo 写入到log file中,缺省的设置为512kb,或者128kb*cpu_count (cpu_count由ORACLE自动设置,一般不需要更改)的最大值。

    在10g中ORACLE会自动调整它的值,他遵循这样一个原则,'Fixed SGA Size'+ 'Redo Buffers'是granule size 的整数倍(其实不能完全的说是整数倍,如果是一倍,那么他们的比值可能为0.999...如果是2倍,那么他们的比值可能是1.999......以此类推)。

    一般的granule value 为4194304 ,也就是4m,而fixed size 一般为 1.2m ,这个值不确定,也不精确,根据不同的平台有所差异,而默认的log_buffer+fixed size 的大小为 granule size 的整数倍,所以默认的情况下你看见的log_buffer大小约为6.67m或者为2.7M。

    所以如果我们手动的设置log_buffer的值,那么ORACLE会将它加上fixed size 然后除以granule ,得到一个值,然后四舍五入,看最接近哪个整数,然后就取最接近的那个值


    以下为自己试验:

    查看log_buffer大小:

    SQL> show parameter log_buffer;
    
    NAME				     TYPE	 VALUE
    ------------------------------------ ----------- ------------------------------
    log_buffer			     integer	 6172160

    查看granule大小:

    SQL> select * from v$sgainfo where name='Granule Size';
    
    NAME				      BYTES RES
    -------------------------------- ---------- ---
    Granule Size			    4194304 No

    查看fixed sga大小:

    SQL> select * from v$sgainfo where name='Fixed SGA Size';
    
    NAME				      BYTES RES
    -------------------------------- ---------- ---
    Fixed SGA Size			    2019384 No

    查看redo buffer大小:

    SQL> show sga
    
    Total System Global Area  180355072 bytes
    Fixed Size		    2019384 bytes
    Variable Size		   88084424 bytes
    Database Buffers	   83886080 bytes
    Redo Buffers		    6365184 bytes

    计算结果:

    SQL> select (6365184 + 2019384)/4194304 from dual;
    
    (6365184+2019384)/4194304
    -------------------------
    	       1.99903679


    for linux and python
  • 相关阅读:
    字符串替换
    Problem E: Automatic Editing
    正则表达式学习(1)
    python中的enumerate使用
    使用bottle进行web开发(9):文件上传;json传递
    使用bottle进行web开发(8):get的参数传递,form里的额数据传递等
    dict的setdefault(学习bottle源代码)
    使用bottle进行web开发(6):Response 对象
    使用bottle进行web开发(5):Generating Content
    使用bottle进行web开发(4):HTTPError
  • 原文地址:https://www.cnblogs.com/kellyseeme/p/5525186.html
Copyright © 2020-2023  润新知