Thursday, February 4, 2010

How to calculate average LMS service time?

average LMS service time = average latency - average time to build consistent read block - average time to wait for log flush - average time to send completed block



SELECT
 average_latency AS "Average Latency",
 average_build_time AS "Average Build Time",
 average_flush_time AS "Average Flush Time",
 average_send_time AS "Average Send Time",
 average_latency - average_build_time - average_flush_time - average_send_time
 AS "Average LMS Service Time"
 FROM
 (
 SELECT
 (gc_cr_block_receive_time * 10) / gc_cr_blocks_received AS average_latency,
 (gc_cr_block_build_time * 10) / gc_cr_blocks_served AS average_build_time,
 (gc_cr_block_flush_time * 10) / gc_cr_blocks_served AS average_flush_time,
 (gc_cr_block_send_time * 10) / gc_cr_blocks_served AS average_send_time
 FROM
 (
 SELECT value AS gc_cr_block_receive_time FROM v$sysstat
 WHERE name = 'gc cr block receive time'
 ),
 (
 SELECT value AS gc_cr_blocks_received FROM v$sysstat
 WHERE name = 'gc cr blocks received'
 ),
 (
 SELECT value AS gc_cr_block_build_time FROM v$sysstat
 WHERE name = 'gc cr block build time'
 ),
 (
 SELECT value AS gc_cr_block_flush_time FROM v$sysstat
 WHERE name = 'gc cr block flush time'
 ),
 (
 SELECT value AS gc_cr_block_send_time FROM v$sysstat
 WHERE name = 'gc cr block send time'
 ),
 (
 SELECT value AS gc_cr_blocks_served FROM v$sysstat
 WHERE name = 'gc cr blocks served'
 )
 );



Julian Dyke - "Pro Oracle Database 10g RAC on Linux" - p694
The difference between the average latency time and the sum of the average build, flush, and
send times represents the time spent in the LMS service and the time spent transmitting the messages
across the interconnect. The following is example output from this query:
Average Average Average Average Average
Latency Build Time Flush Time Send Time LMS Service Time
----------- ----------- ------------ ------------ ----------------
40.7488403 0.039572616 0.716264345 0.035615354 39.957388
In the example just shown, there is in fact a high LMS Service Time, and therefore the high
latency should be addressed by improving the server node resources, such as processing power available.
Further evidence for this diagnosis should be available from your operating system utilities.

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home