このセクションでは、OceanBaseテナントの監視メトリクスであるウェイトイベントについて説明します。ウェイトイベントとは、1秒間に発生するウェイトイベントの回数を指します。OCPはウェイトイベントのタイプに基づき、以下の11個の詳細メトリクスを提供し、異なるタイプのウェイトイベントが1秒間に発生する回数をそれぞれ集計します。具体的には、all(1秒間のウェイトイベント回数)、application_wait(1秒間のapplicationウェイトイベント回数)、configuration_lock_wait(1秒間のconfigurationイベント回数)、administrative_wait(1秒間のadministrativeウェイトイベント回数)、concurrency_wait(1秒間のconcurrencyウェイトイベント回数)、commit_wait(1秒間のcommitウェイトイベント回数)、network_wait(1秒間のnetworkウェイトイベント回数)、user_io_wait(1秒間のuser_ioウェイトイベント回数)、system_io_wait(1秒間のsystem_ioウェイトイベント回数)、cluster_wait(1秒間のclusterウェイトイベント回数)、other_wait(1秒間のその他のウェイトイベント回数)です。集計範囲を指定することで、単一ゾーンまたはOBServerノード上のテナントのウェイトイベントデータを照会できます。
all
指標の紹介
統計範囲内で、テナントが1秒間に発生させる待機イベントの数を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| all | wait_event_count | times/s |
計算式
sum(rate(ob_waitevent_wait_total{@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
OceanBase V4.0 より前のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, sum(total_waits) as total_waits, sum(time_waited_micro) / 1000000 as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_idOceanBase V4.0 以上のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, sum(total_waits) as total_waits, sum(time_waited_micro) / 1000000 as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id
application_wait
指標の紹介
統計範囲内で、テナントが1秒間に発生させるアプリケーション待機イベントの数を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| application_wait | system_event_application_total_waits | times/s |
計算式
sum(rate(ob_system_event_total_waits{event_group="CONFIGURATION",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
OceanBase V4.0 より前のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_groupOceanBase V4.0 以上のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_group
configuration_lock_wait
指標の紹介
統計範囲内で、テナントが1秒間に発生させるconfigurationイベントの回数を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| configuration_lock_wait | system_event_configuration_total_waits | times/s |
計算式
sum(rate(ob_system_event_total_waits{event_group="CONFIGURATION",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
OceanBase V4.0 より前のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_groupOceanBase V4.0 以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_group
administrative_wait
指標の紹介
統計範囲内で、テナントが1秒間に発生させるadministrative待機イベントの回数を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| administrative_wait | system_event_administrative_total_waits | times/s |
計算式
sum(rate(ob_system_event_total_waits{event_group="ADMINISTRATIVE",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
OceanBase V4.0 より前のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_groupOceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_group
concurrency_wait
指標の紹介
統計範囲内で、テナントが1秒間に発生させるconcurrency待機イベントの回数を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| concurrency_wait | system_event_concurrency_total_waits | times/s |
計算式
sum(rate(ob_system_event_total_waits{event_group="CONCURRENCY",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
OceanBase V4.0未満のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_groupOceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_group
commit_wait
指標の紹介
統計範囲内で、テナントが1秒間に発生させるcommit待機イベントの回数を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| commit_wait | system_event_commit_total_waits | times/s |
計算式
sum(rate(ob_system_event_total_waits{event_group="COMMIT",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
OceanBase V4.0未満のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_groupOceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_group
network_wait
指標の紹介
統計範囲内で、テナントで1秒間に発生するネットワーク待機イベントの回数を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| network_wait | system_event_network_total_waits | times/s |
計算式
sum(rate(ob_system_event_total_waits{event_group="NETWORK",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
OceanBase V4.0未満のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_groupOceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_group
user_io_wait
指標の紹介
統計範囲内で、テナントが1秒間に発生させるuser_io待機イベントの回数を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| user_io_wait | system_event_user_io_total_waits | times/s |
計算式
sum(rate(ob_system_event_total_waits{event_group="USER_IO",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
OceanBase V4.0 より前のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_groupOceanBase V4.0 以上のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_group
system_io_wait
指標の紹介
統計範囲内で、テナントが1秒間に発生させるsystem_io待機イベントの回数を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| system_io_wait | system_event_system_io_total_waits | times/s |
計算式
sum(rate(ob_system_event_total_waits{event_group="SYSTEM_IO",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
OceanBase V4.0 より前のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_groupOceanBase V4.0 以上のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_group
cluster_wait
指標の紹介
統計範囲内で、テナントが1秒間に発生させるクラスタ待機イベントの回数を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| cluster_wait | system_event_cluster_total_waits | times/s |
計算式
sum(rate(ob_system_event_total_waits{event_group="CLUSTER",@LABELS}[@INTERVAL])) by (@GBLABELS)
クエリSQL
OceanBase V4.0 より前のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_groupOceanBase V4.0 以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_group
other_wait
指標の紹介
統計範囲内で、テナントが1秒間に発生させるその他の待機イベントの回数を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| other_wait | system_event_other_total_waits | times/s |
計算式
sum(rate(ob_system_event_total_waits{event_group="OTHER",@LABELS}[@INTERVAL])) by (@GBLABELS)
クエリSQL
OceanBase V4.0 より前のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_groupOceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, wait_class as event_group, sum(total_waits) as total_waits, sum(time_waited_micro / 1000000) as time_waited from v$system_event where v$system_event.wait_class <> 'IDLE' and (con_id > 1000 or con_id = 1) group by tenant_id, event_group