このセクションでは、OceanBaseクラスタのパフォーマンス指標であるTPS(Transactions Per Second)について説明します。この指標は、クラスタのトランザクションを集計するために4つのサブ指標に細分化されており、それぞれ以下の通りです:all(1秒あたりのトランザクション処理数)、trans_commit_count(1秒あたりのトランザクションコミット数)、trans_rollback_count(1秒あたりのトランザクションロールバック数)、trans_timeout_count(1秒あたりのタイムアウトトランザクション数)。統計範囲を指定することで、単一ゾーンまたはOBServerノード上のOceanBaseクラスタのTPSデータを照会できます。
all
指標紹介
OceanBaseクラスタが1秒間に処理するトランザクション数。
指標パラメータ説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| all | tps | times/s |
計算式
sum(rate(ob_sysstat{stat_id="30005",@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 (30005) 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 (30005) and (con_id > 1000 or con_id = 1) and class < 1000
trans_commit_count
指標紹介
OceanBaseクラスタが1秒間にコミットするトランザクション数。
指標パラメータ説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| trans_commit_count | transaction_commit_count | times/s |
計算式
sum(rate(ob_sysstat{stat_id="30007",@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 (30007) 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 (30007) and (con_id > 1000 or con_id = 1) and class < 1000
trans_rollback_count
指標の紹介
OceanBaseクラスタが1秒間にロールバックするトランザクション数です。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| trans_rollback_count | transaction_rollback_count | times/s |
計算式
sum(rate(ob_sysstat{stat_id="30009",@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 (30009) 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 (30009) and (con_id > 1000 or con_id = 1) and class < 1000
trans_timeout_count
指標の紹介
OceanBaseクラスタが1秒間にタイムアウトするトランザクション数です。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| trans_timeout_count | transaction_timeout_count | times/s |
計算式
sum(rate(ob_sysstat{stat_id="30011",@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 (30011) 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 (30011) and (con_id > 1000 or con_id = 1) and class < 1000