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/