このセクションでは、OceanBaseテナントの監視メトリクスであるイベント待機時間について説明します。このメトリクスは、さまざまなタイプのイベント待機時間を集計したもので、以下が含まれます:all(イベント平均待機時間)、application_wait(applicationイベント平均待機時間)、configuration_wait(configurationイベント平均待機時間)、administrative_wait(administrativeイベント平均待機時間)、concurrency_wait(concurrencyイベント平均待機時間)、commit_wait(commitイベント平均待機時間)、network_wait(networkイベント平均待機時間)、user_io_wait(user_ioイベント平均待機時間)、system_io_wait(system_ioイベント平均待機時間)、cluster_wait(clusterイベント平均待機時間)、other_wait(その他のイベント平均待機時間)。集計範囲を指定することで、単一ゾーンまたはOBServerノード上のテナントのイベント待機時間データを照会できます。
all
指標の紹介
統計範囲内のテナントの待機イベントの平均待機時間です。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| all | wait_event_rt | μs |
計算式
sum(rate(ob_waitevent_wait_seconds_total{@LABELS}[@INTERVAL])) by (@GBLABELS) / 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
指標の紹介
統計範囲内のテナントのapplication待機イベントの平均時間です。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| application_wait | system_event_application_time_waited | μs |
計算式
sum(rate(ob_system_event_time_waited{event_group="APPLICATION",@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_wait
指標の紹介
統計範囲内で、テナントのconfiguration待機イベントの平均時間です。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| configuration_wait | system_event_configuration_time_waited | μs |
計算式
sum(rate(ob_system_event_time_waited{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
指標の紹介
統計範囲内で、テナントのadministrative待機イベントの平均時間です。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| administrative_wait | system_event_administrative_time_waited | μs |
計算式
sum(rate(ob_system_event_time_waited{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
指標の紹介
統計範囲内における、テナントのconcurrency待機イベントの平均時間を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| concurrency_wait | system_event_concurrency_time_waited | μs |
計算式
sum(rate(ob_system_event_time_waited{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
指標の紹介
統計範囲内における、テナントのcommit待機イベントの平均時間を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| commit_wait | system_event_commit_time_waited | μs |
計算式
sum(rate(ob_system_event_time_waited{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
指標の紹介
統計範囲内で、テナントのnetwork待機イベントの平均時間を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| network_wait | system_event_network_time_waited | μs |
計算式
sum(rate(ob_system_event_time_waited{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
指標の紹介
統計範囲内で、テナントのuser_io待機イベントの平均時間を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| user_io_wait | system_event_user_io_time_waited | μs |
計算式
sum(rate(ob_system_event_time_waited{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
指標の紹介
統計範囲内で、テナントのsystem_io待機イベントの平均時間を示します。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| system_io_wait | system_event_system_io_time_waited | μs |
計算式
sum(rate(ob_system_event_time_waited{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
指標の紹介
統計範囲内のテナントのクラスタ待機イベントの平均時間です。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| cluster_wait | system_event_cluster_time_waited | μs |
計算式
sum(rate(ob_system_event_time_waited{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
指標の紹介
統計範囲内のその他の待機イベントの平均時間です。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| other_wait | system_event_other_time_waited | μ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, case when event_id = 10000 then 'INTERNAL' when event_id = 13000 then 'SYNC_RPC' when event_id = 14003 then 'ROW_LOCK_WAIT' when (event_id >= 10001 and event_id <= 11006) or (event_id >= 11008 and event_id <= 11011) then 'IO' when event like 'latch:%' then 'LATCH' else 'OTHER' END 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, case when event_id = 10000 then 'INTERNAL' when event_id = 13000 then 'SYNC_RPC' when event_id = 14003 then 'ROW_LOCK_WAIT' when (event_id >= 10001 and event_id <= 11006) or (event_id >= 11008 and event_id <= 11011) then 'IO' when event like 'latch:%' then 'LATCH' else 'OTHER' END 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