Database Reference
In-Depth Information
Prepare Phase
Irrespective of the type of block being transferred (current block or consistent read block), the average time required
to prepare the block for transmission to the requestor is computed using the following formula:
Prepare latency = Blocks served time ÷ number of blocks served
How do you compute the time required to serve data blocks? This is the primary part of the preparation phase,
and the steps depend on the type of block being served (current—DML block or CR—consistent read block). The steps
involved include the time required to
1.
Build the block
2.
Flush the block to redo logs, if the redo is pending at the time of the BAST
3.
Send the block
4.
Pin the block to the buffer
This instrumentation required to determine the time taken for each of these steps is available within the Oracle
database in the GV$SYSSTAT or the GV$SESSTAT views. Using the matrix available in these views, the blocks served time
can be calculated using
Blocks served time = (gc cr block flush time ÷ gc cur blocks flushed
+ gc current block flush time ÷ gc current blocks flushed + gc current block pin time)
× 10
Similarly, using the statistics available in the V$SYSSTAT views, the blocks served can also be calculated:
Blocks served = (gc current blocks served + gc cr blocks served)
Performance Impact of the Prepare Phase
The primary function of finding and processing the requested data block in the prepare phase belongs to the GCS
performed by the LMS background process. Most of the functions that the LMS performs, such as granting rights to
data blocks, finding the block, placing the block on flush, down convert or defer queues, and so forth, all require CPU
resources. Every request performed by the LMS background process requires eight O/S latches (controlled by the
underscore parameter _GC_LATCHES = 8 ).
LatCh
a latch 3 is a type of a lock that can be very quickly acquired and freed. latches are typically used to prevent more
than one process from executing the same piece of code at a given time. associated with each latch is a cleanup
procedure that will be called if a process dies while holding the latch. latches have an associated level that is
used to prevent deadlocks. once a process acquires a latch at a certain level, it cannot subsequently acquire a
latch at a level that is equal to or less than that level (unless it acquires it nowait).
3 Metalink Note # 22908.1.
 
Search WWH ::




Custom Search