このセクションでは、OceanBaseクラスタのパフォーマンス指標であるトランザクション数について説明します。トランザクション数は、OceanBaseクラスタが1秒間に処理するトランザクションの回数を集計する指標です。この指標は、trans_single_partition_count(1秒間の通常トランザクション数)とtrans_multi_partition_count(1秒間の分散トランザクション数)という2つのサブ指標に細分化されています。統計範囲を指定することで、単一ゾーンまたはOBServerノード上のOceanBaseクラスタのトランザクション数を照会できます。
trans_single_partition_count
指標の紹介
OceanBaseクラスタが1秒間に処理する通常トランザクションの回数。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| trans_single_partition_count | transaction_single_partition_count | times/s |
計算式
sum(rate(ob_sysstat{stat_id="30012",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL収集
OceanBase V4.0 より前のバージョン:
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 < 1000OceanBase V4.0 以降のバージョン:
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
trans_multi_partition_count
指標の紹介
OceanBaseクラスタが1秒間に処理する分散トランザクションの回数。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| trans_multi_partition_count | transaction_multi_partition_count | times/s |
計算式
sum(rate(ob_sysstat{stat_id="30013",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL収集
OceanBase V4.0 未満のバージョン:
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 < 1000OceanBase V4.0 以降のバージョン:
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