simulator lru latch 与 buffer cache


simulator lru latch 与 buffer cache

某客户等待事件持续等待127号latch

       SID EVENT                        P1         P2         P3
---------- -------------------- ---------- ---------- ----------
       439 db file sequential r         65     445464          1
           ead

       466 latch free           1.3835E+19        127          0
       810 latch free           1.3835E+19         42          0
      1222 SQL*Net break/reset  1650815232          0          0
           to client

      1519 latch free           1.3835E+19        127          1
      1539 latch free           1.3835E+19        127          1
      1616 direct path write            48    2613873          4

       SID EVENT                        P1         P2         P3
---------- -------------------- ---------- ---------- ----------
      1646 SQL*Net message to c 1650815232          1          0
           lient

      2209 direct path write            48    2613880          1
      2923 latch: session alloc 1.3835E+19          4          0
           ation

      3147 SQL*Net message to c 1952673792          1          0
           lient


11 rows selected.

SQL> select *
  2  from v$latchname
  3  where latch# = 127;

    LATCH# NAME                                                     HASH
---------- -------------------------------------------------- ----------
       127 simulator lru latch                                 405505728

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

db cache advisor为了预测不同cache大小的情况下的物理读情况而使用了一种模拟机制(simulator)
最终的结果反应在该视图上:
                                        Est
                                       Phys
    Size for   Size      Buffers for   Read          Estimated
P    Est (M) Factor         Estimate Factor     Physical Reads
--- -------- ------ ---------------- ------ ------------------
D        944     .1          116,761    1.2      6,074,831,447
D      1,888     .2          233,522    1.2      5,916,129,503
D      2,832     .3          350,283    1.2      5,769,121,021
D      3,776     .4          467,044    1.1      5,630,775,914
D      4,720     .5          583,805    1.1      5,499,340,483
D      5,664     .6          700,566    1.1      5,373,848,691
D      6,608     .7          817,327    1.1      5,253,802,351
D      7,552     .8          934,088    1.0      5,138,475,199
D      8,496     .9        1,050,849    1.0      5,027,070,786
D      9,440    1.0        1,167,610    1.0      4,919,030,510
D      9,584    1.0        1,185,421    1.0      4,902,627,738
D     10,384    1.1        1,284,371    1.0      4,813,848,937
D     11,328    1.2        1,401,132    1.0      4,711,101,306
D     12,272    1.3        1,517,893    0.9      4,610,405,709
D     13,216    1.4        1,634,654    0.9      4,511,448,976
D     14,160    1.5        1,751,415    0.9      4,413,908,437
D     15,104    1.6        1,868,176    0.9      4,317,470,879
D     16,048    1.7        1,984,937    0.9      4,221,842,912
D     16,992    1.8        2,101,698    0.8      4,126,745,605
D     17,936    1.9        2,218,459    0.8      4,031,923,890
D     18,880    2.0        2,335,220    0.8      3,937,181,115
          -------------------------------------------------------------

当一个block写入真是的cache的时候,这个block的dba及其它信心将会同时写入trace buffer。
前台进程周期性的扫描trace buffer在simulated cache中模拟对物理读的影响。
由于该simulator cache依然采用类似buffer cache的hash bucket及lru算法进行管理,
那么在获取cache的空间时需获取simulator lru latch
在进行相关读写操作时需首先获取simulator hash latch
如果系统中类似的latch争用严重,则可以考虑关闭db_cache_advice

另外,除了对buffer cache采用了这种simulator的模拟机制,对share pool ,library cache也是采用了类似的模拟机制。

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14130873/viewspace-624245/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/14130873/viewspace-624245/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值