このセクションでは、テナントのOBKV_Redisタイプモニタリング項目のパフォーマンス指標である 応答時間(RT) について説明します。この指標は、テナントが1秒間に平均して処理するSQL行数を集計します。統計範囲を指定することで、単一ゾーンまたはOBServerノード上のテナントのOBKV_Redisタイプの 応答時間(RT) データを照会できます。
all
指標の紹介
SQLステートメントの平均処理時間。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| all | obkv_redis_sql_all_rt | μs |
計算式
(sum(rate(ob_sysstat{stat_id="191644",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191632",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191590",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191596",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191510",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191518",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191542",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191558",@LABELS}[@INTERVAL])) by (@GBLABELS)) / (sum(rate(ob_sysstat{stat_id="191643",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191631",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191589",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191595",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191509",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191517",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191541",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191557",@LABELS}[@INTERVAL])) by (@GBLABELS))
SQL収集
OceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (191644, 191632, 191590, 191596, 191510, 191518, 191542, 191558, 191643, 191631, 191589, 191595, 191509, 191517, 191541, 191557) and (con_id > 1000 or con_id = 1)
set
指標の紹介
SETステートメントの平均処理時間。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| set | obkv_redis_sql_set_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="191644",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="191643",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL収集
OceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (191644, 191643) and (con_id > 1000 or con_id = 1)
get
指標の紹介
GETステートメントの平均処理時間。
指標パラメータ説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| get | obkv_redis_sql_get_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="191632",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="191631",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL収集
OceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (191632, 191631) and (con_id > 1000 or con_id = 1)
hset
指標紹介
HSETステートメントの平均処理時間。
指標パラメータ説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| hset | obkv_redis_sql_hset_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="191590",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="191589",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL収集
OceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (191590, 191589) and (con_id > 1000 or con_id = 1)
hget
指標紹介
HGETステートメントの平均処理時間。
指標パラメータ説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| hget | obkv_redis_sql_hget_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="191596",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="191595",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL収集
OceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (191596, 191595) and (con_id > 1000 or con_id = 1)
lpush
指標紹介
LPUSHステートメントの平均処理時間。
指標パラメータ説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| lpush | obkv_redis_sql_lpush_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="191510",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="191509",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL収集
OceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (191510, 191509) and (con_id > 1000 or con_id = 1)
lpop
指標紹介
LPOPステートメントの平均処理時間。
指標パラメータ説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| lpop | obkv_redis_sql_lpop_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="191518",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="191517",@LABELS}[@INTERVAL])) by (@GBLABELS)
収集SQL
OceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (191518, 191517) and (con_id > 1000 or con_id = 1)
sadd
指標紹介
SADDステートメントの平均処理時間。
指標パラメータ説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| sadd | obkv_redis_sql_sadd_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="191542",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="191541",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
OceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (191542, 191541) and (con_id > 1000 or con_id = 1)
zadd
指標紹介
ZADDステートメントの平均処理時間。
指標パラメータ説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| zadd | obkv_redis_sql_zadd_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="191558",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="191557",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
OceanBase V4.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (191558, 191557) and (con_id > 1000 or con_id = 1)
99-all
指標の紹介
SQL文の平均処理時間TP99。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| 99-all | obkv_redis_sql_all_rt_tp99 | μs |
計算式
histogram_quantile(0.99, sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS SET", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS GET", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS HSET", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS HGET", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS LPUSH", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS LPOP", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS SADD", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS ZADD", @LABELS}[@INTERVAL])) by (@GBLABELS,le))
取得SQL
WITH histogram_data AS (SELECT t1.tenant_id, t1.svr_ip, t1.sql_type, CASE WHEN t1.response_time >= t0.max_rt THEN '+Inf' ELSE t1.response_time * 1000000 END AS response_time, t1.total_count, t1.total_value * 1000000 AS total_value, SUM(t2.total_count) AS cumulative_count, SUM(t2.total_value) * 1000000 AS cumulative_value FROM (SELECT MAX(response_time) AS max_rt FROM gv$ob_query_response_time_histogram) t0 JOIN (SELECT tenant_id, svr_ip, sql_type, response_time, SUM(count) AS total_count, SUM(total) AS total_value FROM gv$ob_query_response_time_histogram GROUP BY response_time, tenant_id, svr_ip, sql_type) t1 ON 1=1 INNER JOIN (SELECT tenant_id, svr_ip, sql_type, response_time, SUM(count) AS total_count, SUM(total) AS total_value FROM gv$ob_query_response_time_histogram GROUP BY response_time, tenant_id, svr_ip, sql_type) t2 ON t1.response_time >= t2.response_time AND t1.tenant_id = t2.tenant_id AND t1.svr_ip = t2.svr_ip AND t1.sql_type = t2.sql_type WHERE t1.svr_ip = ? AND t1.sql_type IN ('SELECT', 'INSERT', 'DELETE', 'UPDATE', 'REPLACE', 'COMMIT', 'OTHER', 'INNER SQL', 'TABLEAPI SELECT', 'TABLEAPI INSERT', 'TABLEAPI DELETE', 'TABLEAPI UPDATE', 'TABLEAPI REPLACE', 'TABLEAPI QUERY AND MUTATE', 'TABLEAPI OTHER', 'HBASE SCAN', 'HBASE PUT', 'HBASE DELETE', 'HBASE APPEND', 'HBASE INCREMENT', 'HBASE CHECK AND PUT', 'HBASE CHECK AND DELETE', 'HBASE HYBRID BATCH', 'REDIS SET', 'REDIS GET', 'REDIS HSET', 'REDIS HGET', 'REDIS LPUSH', 'REDIS LPOP', 'REDIS SADD', 'REDIS ZADD') GROUP BY t1.response_time, t1.tenant_id, t1.sql_type) SELECT * FROM (SELECT tenant_id, svr_ip, sql_type, response_time, cumulative_count FROM histogram_data WHERE sql_type NOT LIKE 'TABLEAPI %' AND sql_type NOT LIKE 'HBASE %' AND sql_type NOT LIKE 'REDIS %' AND EXISTS (SELECT 1 FROM histogram_data g WHERE g.sql_type = sql_type AND cumulative_count > 0) UNION SELECT tenant_id, svr_ip, sql_type, response_time, cumulative_count FROM histogram_data WHERE sql_type LIKE 'TABLEAPI %' AND EXISTS (SELECT 1 FROM histogram_data g WHERE g.sql_type LIKE 'TABLEAPI %' AND cumulative_count > 0) UNION SELECT tenant_id, svr_ip, sql_type, response_time, cumulative_count FROM histogram_data WHERE sql_type LIKE 'HBASE %' AND EXISTS (SELECT 1 FROM histogram_data g WHERE g.sql_type LIKE 'HBASE %' AND cumulative_count > 0) UNION SELECT tenant_id, svr_ip, sql_type, response_time, cumulative_count FROM histogram_data WHERE sql_type LIKE 'REDIS %' AND EXISTS (SELECT 1 FROM histogram_data g WHERE g.sql_type LIKE 'REDIS %' AND cumulative_count > 0)) all_histogram_data ORDER BY tenant_id, svr_ip, sql_type, response_time
95-all
指標の紹介
SQL文の平均処理時間TP95。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| 95-all | obkv_redis_sql_all_rt_tp95 | μs |
計算式
histogram_quantile(0.95, sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS SET", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS GET", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS HSET", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS HGET", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS LPUSH", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS LPOP", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS SADD", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS ZADD", @LABELS}[@INTERVAL])) by (@GBLABELS,le))
取得SQL
WITH histogram_data AS (SELECT t1.tenant_id, t1.svr_ip, t1.sql_type, CASE WHEN t1.response_time >= t0.max_rt THEN '+Inf' ELSE t1.response_time * 1000000 END AS response_time, t1.total_count, t1.total_value * 1000000 AS total_value, SUM(t2.total_count) AS cumulative_count, SUM(t2.total_value) * 1000000 AS cumulative_value FROM (SELECT MAX(response_time) AS max_rt FROM gv$ob_query_response_time_histogram) t0 JOIN (SELECT tenant_id, svr_ip, sql_type, response_time, SUM(count) AS total_count, SUM(total) AS total_value FROM gv$ob_query_response_time_histogram GROUP BY response_time, tenant_id, svr_ip, sql_type) t1 ON 1=1 INNER JOIN (SELECT tenant_id, svr_ip, sql_type, response_time, SUM(count) AS total_count, SUM(total) AS total_value FROM gv$ob_query_response_time_histogram GROUP BY response_time, tenant_id, svr_ip, sql_type) t2 ON t1.response_time >= t2.response_time AND t1.tenant_id = t2.tenant_id AND t1.svr_ip = t2.svr_ip AND t1.sql_type = t2.sql_type WHERE t1.svr_ip = ? AND t1.sql_type IN ('SELECT', 'INSERT', 'DELETE', 'UPDATE', 'REPLACE', 'COMMIT', 'OTHER', 'INNER SQL', 'TABLEAPI SELECT', 'TABLEAPI INSERT', 'TABLEAPI DELETE', 'TABLEAPI UPDATE', 'TABLEAPI REPLACE', 'TABLEAPI QUERY AND MUTATE', 'TABLEAPI OTHER', 'HBASE SCAN', 'HBASE PUT', 'HBASE DELETE', 'HBASE APPEND', 'HBASE INCREMENT', 'HBASE CHECK AND PUT', 'HBASE CHECK AND DELETE', 'HBASE HYBRID BATCH', 'REDIS SET', 'REDIS GET', 'REDIS HSET', 'REDIS HGET', 'REDIS LPUSH', 'REDIS LPOP', 'REDIS SADD', 'REDIS ZADD') GROUP BY t1.response_time, t1.tenant_id, t1.sql_type) SELECT * FROM (SELECT tenant_id, svr_ip, sql_type, response_time, cumulative_count FROM histogram_data WHERE sql_type NOT LIKE 'TABLEAPI %' AND sql_type NOT LIKE 'HBASE %' AND sql_type NOT LIKE 'REDIS %' AND EXISTS (SELECT 1 FROM histogram_data g WHERE g.sql_type = sql_type AND cumulative_count > 0) UNION SELECT tenant_id, svr_ip, sql_type, response_time, cumulative_count FROM histogram_data WHERE sql_type LIKE 'TABLEAPI %' AND EXISTS (SELECT 1 FROM histogram_data g WHERE g.sql_type LIKE 'TABLEAPI %' AND cumulative_count > 0) UNION SELECT tenant_id, svr_ip, sql_type, response_time, cumulative_count FROM histogram_data WHERE sql_type LIKE 'HBASE %' AND EXISTS (SELECT 1 FROM histogram_data g WHERE g.sql_type LIKE 'HBASE %' AND cumulative_count > 0) UNION SELECT tenant_id, svr_ip, sql_type, response_time, cumulative_count FROM histogram_data WHERE sql_type LIKE 'REDIS %' AND EXISTS (SELECT 1 FROM histogram_data g WHERE g.sql_type LIKE 'REDIS %' AND cumulative_count > 0)) all_histogram_data ORDER BY tenant_id, svr_ip, sql_type, response_time
90-all
指標の紹介
SQL文の平均処理時間TP90。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| 90-all | obkv_redis_sql_all_rt_tp90 | μs |
計算式
histogram_quantile(0.90, sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS SET", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS GET", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS HSET", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS HGET", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS LPUSH", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS LPOP", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS SADD", @LABELS}[@INTERVAL])) by (@GBLABELS,le) FILL_0_ADD sum(rate(ob_query_rt_cumulative_count{sql_type="REDIS ZADD", @LABELS}[@INTERVAL])) by (@GBLABELS,le))
取得SQL
WITH histogram_data AS (SELECT t1.tenant_id, t1.svr_ip, t1.sql_type, CASE WHEN t1.response_time >= t0.max_rt THEN '+Inf' ELSE t1.response_time * 1000000 END AS response_time, t1.total_count, t1.total_value * 1000000 AS total_value, SUM(t2.total_count) AS cumulative_count, SUM(t2.total_value) * 1000000 AS cumulative_value FROM (SELECT MAX(response_time) AS max_rt FROM gv$ob_query_response_time_histogram) t0 JOIN (SELECT tenant_id, svr_ip, sql_type, response_time, SUM(count) AS total_count, SUM(total) AS total_value FROM gv$ob_query_response_time_histogram GROUP BY response_time, tenant_id, svr_ip, sql_type) t1 ON 1=1 INNER JOIN (SELECT tenant_id, svr_ip, sql_type, response_time, SUM(count) AS total_count, SUM(total) AS total_value FROM gv$ob_query_response_time_histogram GROUP BY response_time, tenant_id, svr_ip, sql_type) t2 ON t1.response_time >= t2.response_time AND t1.tenant_id = t2.tenant_id AND t1.svr_ip = t2.svr_ip AND t1.sql_type = t2.sql_type WHERE t1.svr_ip = ? AND t1.sql_type IN ('SELECT', 'INSERT', 'DELETE', 'UPDATE', 'REPLACE', 'COMMIT', 'OTHER', 'INNER SQL', 'TABLEAPI SELECT', 'TABLEAPI INSERT', 'TABLEAPI DELETE', 'TABLEAPI UPDATE', 'TABLEAPI REPLACE', 'TABLEAPI QUERY AND MUTATE', 'TABLEAPI OTHER', 'HBASE SCAN', 'HBASE PUT', 'HBASE DELETE', 'HBASE APPEND', 'HBASE INCREMENT', 'HBASE CHECK AND PUT', 'HBASE CHECK AND DELETE', 'HBASE HYBRID BATCH', 'REDIS SET', 'REDIS GET', 'REDIS HSET', 'REDIS HGET', 'REDIS LPUSH', 'REDIS LPOP', 'REDIS SADD', 'REDIS ZADD') GROUP BY t1.response_time, t1.tenant_id, t1.sql_type) SELECT * FROM (SELECT tenant_id, svr_ip, sql_type, response_time, cumulative_count FROM histogram_data WHERE sql_type NOT LIKE 'TABLEAPI %' AND sql_type NOT LIKE 'HBASE %' AND sql_type NOT LIKE 'REDIS %' AND EXISTS (SELECT 1 FROM histogram_data g WHERE g.sql_type = sql_type AND cumulative_count > 0) UNION SELECT tenant_id, svr_ip, sql_type, response_time, cumulative_count FROM histogram_data WHERE sql_type LIKE 'TABLEAPI %' AND EXISTS (SELECT 1 FROM histogram_data g WHERE g.sql_type LIKE 'TABLEAPI %' AND cumulative_count > 0) UNION SELECT tenant_id, svr_ip, sql_type, response_time, cumulative_count FROM histogram_data WHERE sql_type LIKE 'HBASE %' AND EXISTS (SELECT 1 FROM histogram_data g WHERE g.sql_type LIKE 'HBASE %' AND cumulative_count > 0) UNION SELECT tenant_id, svr_ip, sql_type, response_time, cumulative_count FROM histogram_data WHERE sql_type LIKE 'REDIS %' AND EXISTS (SELECT 1 FROM histogram_data g WHERE g.sql_type LIKE 'REDIS %' AND cumulative_count > 0)) all_histogram_data ORDER BY tenant_id, svr_ip, sql_type, response_time