TPS

2025-07-25 05:50:59  Updated

This topic describes the performance metric TPS within an OceanBase cluster. TPS indicates the number of transactions processed per second in an OceanBase cluster. TPS consists of the following two sub-metrics: transaction_single_partition_count that indicates the number of general transactions processed per second, and transaction_multi_partition_count that indicates the number of distributed transactions processed per second in a cluster. You can specify a statistical period to query the TPS in a single zone or on a single OBServer of an OceanBase cluster.

transaction_single_partition_count

Definition

The total number of general transactions processed per second in an OceanBase cluster.

Metric

Metric Metric name Unit
transaction_single_partition_count transaction_single_partition_count times/s

Calculation expression

sum(rate(ob_sysstat{stat_id="30012",@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 (30012) 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 (30012) and (con_id > 1000 or con_id = 1) and class < 1000
    

transaction_single_partition_count

Definition

The total number of distributed transactions processed per second in an OceanBase cluster.

Metric

Metric Metric name Unit
transaction_multi_partition_count transaction_multi_partition_count times/s

Calculation expression

sum(rate(ob_sysstat{stat_id="30013",@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 (30013) 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 (30013) and (con_id > 1000 or con_id = 1) and class < 1000
    

Contact Us