Monday, August 23, 2010

Oracle Block Remastering

Here's good arcticle on dynamic remastering.

Remastering granularity
  • Oracle 10g-11g.  Block range (128 blocks in a range)

Queries:


select kj.*, le.le_Addr from (
select kjblname, kjblname2, kjblowner, kjblmaster, kjbllockp,
substr ( kjblname2,  instr(kjblname2,',')+1,   instr(kjblname2,',',1,2)-instr(kjblname2,',',1,1)-1)/65536 fl,
substr ( kjblname2, 1, instr(kjblname2,',')-1) blk
 from x$kjbl
) kj, x$le le
where le.le_kjbl = kj.kjbllockp
 order by le.le_addr
/


select * from x$object_affinity_statistics
/

select * from v$gcspfmaster_info
/

Remasting Technique

  • With object remastering feature, if an object is accessed by an instance aggressively, then that instance will become the master of the object reducing gc remote grants improving performance of the application. In the prior sentence, I used the word “accessed”, but it is a loose term, and the correct term is if the instance is requesting much BL locks on an object, then that object can be remastered. 
  • Instance GRD is frozen during reconfiguration and in a very busy instances, this can take many seconds leading to instance freeze for several seconds.
Internal Parameters
  • _gc_affinity_limit - the number of "opens" before an object is considered for remastering (defaults to 50)
  • _gc_affinity_time - how often the queue is checked for remastering (defaults to 10 minutes)
  • _gc_affinity_minimum - minimum amount of dynamic affinity activity per minute to be a candidate for remastering (defaults to 600/minute/cpu)
  • _gc_undo_affinity - controls whether dynamic undo remastering is enabled
Evidence of remastering performance problems
  • Wait events: "gcs drm freeze", "gc remaster", "gcs freeze"
  • Log entries at the same time "DRM start"