Cache Fusion Oracle Rac
Cache Fusion Oracle Rac
Cache Fusion Oracle Rac
By
Riyaj Shamsudeen
rshamsud@orainternals.com
orainternals.wordpress.com
Web: www.orainternals.com
Demo: wireshark
MTU
FG
LMS
1
1
2
8K 2
3 8K
buffer 3
4 Switch 4 buffer
5
5
6
6
Fragment Assembly
Block is not in any buffer cache. LMS grants a PR mode lock on the
resource and asks FG to read from the disk.
FG FG FG
1
LMD LMD LMD
2
LMS LMS LMS
FG – Foreground Process
PR mode lock LMD – Lock Manager Daemon
GRD – Global Resource Directory
Disk files
Demo: demo_01a.sql
©OraInternals Riyaj Shamsudeen 7
Trace lines
WAIT #18446741324875049632: nam='gc cr grant 2-way' ela= 499 p1=7 p2=6867 p3=1 obj#=76484
tim=4597940025
WAIT #18446741324875049632: nam='db file sequential read' ela= 758 file#=7 block#=6867 blocks=1
obj#=76484 tim=4597941129
PR mode
X$bh BH Buffer
X$le LE
Shadow Shadow
X$kjbl [0x1ac4][0x7],[BL] [0x1ac4][0x7],[BL]
X$kjbr Resource
[0x1ac4][0x7],[BL] A shadow structure setup in instance
1 to keep track of the resource.
Instance 2 (directory instance) Instance 1
FG FG FG
2
LMD LMD LMD
1
LMS LMS LMS
[0x1ad3][0x7],[BL]
[0x1ad3][0x7],[BL]
PR mode lock
PR mode lock
Disk files FG – Foreground Process
LMD – Lock Manager Daemon
GRD – Global Resource Directory
X$bh BH Buffer
X$le LE
Client
X$kjbl [0x1ac4][0x7],[BL]
X$kjbr Resource
[0x1ac4][0x7],[BL] A resource structure already exists still
that block is in the buffer cache.
Instance 2 (Directory instance)
X$le LE LE
FG LMS FG LMS
EX PI EX
EX
Apply undo
CR CR
CR CR
EX mode lock
If LMS process can not get to a request in 1ms time, then the
response for the request will be marked with ‘congestion’ wait
event.
Inst 1
FG1
Wire
Open request Read from
File #5, blk #8 the disk
LMS
Inst 2
©OraInternals Riyaj Shamsudeen
Why DRM?
charge time to
‘gc cr grant 2-way’
Inst 1
FG1
LMS
Inst 2
Read from
the disk
Excessive amount of GC activity for
One object!
Resources
Resources
RESOURCE_NAME
------------------------------
[0x15f29][0x0],[TM][ext 0x3,0x0] <- hrdb1 PDB – GSTEST table –object_id=89897
[0x15f29][0x0],[TM][ext 0x4,0x0] <- hrdb2 PDB – GSTEST table –object_id=89897
Email: rshamsud@orainternals.com
Blog : orainternals.wordpress.com
Web: www.orainternals.com