基于湖库一体架构,统一管理结构化、半结构化与非结构化等多模态数据,一个系统承载事务处理、实时分析与 AI 工作负载。
SS 宏块命中率
更新时间:2026-08-03 16:09:20
本节介绍 OB SS 模式下宏块缓存命中率相关指标。
说明
以下监控分组适用于 OceanBase 共享存储(SS)模式,要求 OB 集群版本 ≥ 4.6.2.0。采集条件为 ob_mode_is_shared_storage(仅在 SS 模式下采集)。
ob_ss_macro_cache_hit_ratio
指标介绍
OB SS 模式下宏块缓存整体命中率。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| ob_ss_macro_cache_hit_ratio | ob_ss_macro_cache_hit_ratio | % |
计算表达式
100 * avg(rate(ob_ss_macro_cache_hit_cnt{@LABELS}[@INTERVAL])) by (@GBLABELS) / (avg(rate(ob_ss_macro_cache_hit_cnt{@LABELS}[@INTERVAL])) by (@GBLABELS) + avg(rate(ob_ss_macro_cache_miss_cnt{@LABELS}[@INTERVAL])) by (@GBLABELS))
SQL 采集
底层指标 ob_ss_macro_cache_hit_cnt、ob_ss_macro_cache_miss_cnt 由 OB SS 模式宏块缓存统计项导出:
select tenant_id,TOTAL_HIT_CNT as hit_cnt,TOTAL_MISS_CNT as miss_cnt from GV$OB_LOCAL_CACHE where cache_name = "ss_macro_cache" and svr_ip = ? and svr_port = ?
适用版本:OceanBase V4.6.2.0 及以上(SS 模式)
ob_ss_macro_cache_meta_hit_ratio
指标介绍
OB SS 模式下 Meta 宏块命中率。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| ob_ss_macro_cache_meta_hit_ratio | ob_ss_macro_cache_meta_hit_ratio | % |
SQL 采集
OceanBase V4.3.5.1 及以上版本(SS 模式):
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value
from v$sysstat
where stat_id IN (245024, 245025) and (con_id > 1000 or con_id = 1)
ob_ss_macro_cache_tmp_file_hit_ratio
指标介绍
OB SS 模式下临时文件宏块命中率。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| ob_ss_macro_cache_tmp_file_hit_ratio | ob_ss_macro_cache_tmp_file_hit_ratio | % |
SQL 采集
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value
from v$sysstat
where stat_id IN (245030, 245031) and (con_id > 1000 or con_id = 1)
ob_ss_macro_cache_auto_hit_ratio
指标介绍
OB SS 模式下 Auto 类型宏块命中率。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| ob_ss_macro_cache_auto_hit_ratio | ob_ss_macro_cache_auto_hit_ratio | % |
SQL 采集
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value
from v$sysstat
where stat_id IN (245036, 245037) and (con_id > 1000 or con_id = 1)
ob_ss_macro_cache_hot_macro_hit_ratio
指标介绍
OB SS 模式下热点 tablet 宏块命中率。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| ob_ss_macro_cache_hot_macro_hit_ratio | ob_ss_macro_cache_hot_macro_hit_ratio | % |
SQL 采集
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value
from v$sysstat
where stat_id IN (245042, 245043) and (con_id > 1000 or con_id = 1)
ob_ss_private_macro_hit_ratio
指标介绍
OB SS 模式下私有宏块命中率。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| ob_ss_private_macro_hit_ratio | ob_ss_private_macro_hit_ratio | % |
SQL 采集
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value
from v$sysstat
where stat_id IN (245046, 245047) and (con_id > 1000 or con_id = 1)
ob_ss_share_macro_hit_ratio
指标介绍
OB SS 模式下共享宏块命中率。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| ob_ss_share_macro_hit_ratio | ob_ss_share_macro_hit_ratio | % |
SQL 采集
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value
from v$sysstat
where stat_id IN (245050, 245051) and (con_id > 1000 or con_id = 1)
ob_ss_external_table_disk_cache_hit_ratio
指标介绍
OB SS 模式下外表宏块命中率。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| ob_ss_external_table_disk_cache_hit_ratio | ob_ss_external_table_disk_cache_hit_ratio | % |
SQL 采集
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value
from v$sysstat
where stat_id IN (245054, 245055) and (con_id > 1000 or con_id = 1)