Time consumed by transaction logs

2025-01-10 06:15:54  Updated

This topic describes performance metrics related to the time consumed by transaction logs in an OceanBase cluster. You can specify a statistical period to query statistics about the time consumed by transaction logs in a single zone or on a single OBServer of an OceanBase cluster.

write_disk

Definition

The average time consumed in writing transaction logs to the disk.

Description

Metric Metric field name Unit
write_disk clog_write_disk_rt μs

Calculation expression

sum(rate(ob_sysstat{stat_id="80041",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="80040",@LABELS}[@INTERVAL])) by (@GBLABELS)

SQL statements for metric collection

  • If you use OceanBase Database of a version earlier than V4.0, execute the following statement:

    select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (80040, 80041) and (con_id > 1000 or con_id = 1) and class < 1000
    
  • If you use OceanBase Database V4.0 or later, execute the following statement:

    select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (80040, 80041) and (con_id > 1000 or con_id = 1) and class < 1000
    

sync_time

Definition

The average time consumed by each transaction log synchronization operation over the network.

Description

Metric Metric field name Unit
sync_time trans_commit_log_sync_rt μs

Calculation expression

sum(rate(ob_sysstat{stat_id="30000",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30001",@LABELS}[@INTERVAL])) by (@GBLABELS)

SQL statements for metric collection

  • If you use OceanBase Database of a version earlier than V4.0, execute the following statement:

    select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30000, 30001) and (con_id > 1000 or con_id = 1) and class < 1000
    
  • If you use OceanBase Database V4.0 or later, execute the following statement:

    select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30000, 30001) and (con_id > 1000 or con_id = 1) and class < 1000
    

Contact Us