Ask The Real Tom

March 21, 2011



enq:CR – block range reuse ckpt

Filed under: Uncategorized — admin @ 1:29 pm

“enq:CR – block range reuse ckpt”

http://forums.oracle.com/forums/thread.jspa?messageID=9170907

I think the problem is this: when doing parallel DML, Oracle uses direct path reads to read the data. To make sure the data being read is consistent though it needs to checkpoint blocks it is going to read. CR enqueue seems to be used to synchronize CKPT with PX slaves reading the data. It’s going like this: PX slave requests CKPT to checkpoint a range of blocks it’s about to read (and possibly enqueues on CR in order to be able to do so,) CKPT in turn orders DBWR to write all dirty blocks in the requested range, waits for this write to complete and signals PX slave that the blocks are consistent and can be read. Repeat as necessary. Now, with really large buffer cache and good portion of it dirty due to recent DML on source tables, busy CPUs and relatively slow writes this checkpointing might build up into a major performance inhibitor when these recently touched tables are being read in direct path mode: you have 8 cores and 8 parallel slaves, so CKPT, DBWR and pretty much all other background processes are competing with them for CPU time and I/O bandwidth (they all have the same priority, so your PX slaves can easily evict CKPT or DBWR from CPU only to immediately go back to sleep on an enqueue held by a process it just preempted.)

Things to try here:

1. do a checkpoint before running the insert and see if this makes any difference;
2. lower the degree of parallelism to 5-6;
3. If you have more than one DBWR configured – configure db_writer_processes back to 1.

1 Comment »

  1. Hello – In 11gr2 cleaning a bunch of tables and ran a TRUNCATE DROP STORAGE and then a DROP TABLE PURGE.. been running for hour and the ASH report shows the event. Is there a workaround to make this quicker? THanks, RAvi

    Comment by RN — February 27, 2013 @ 5:29 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress