This topic describes the macroblock cache hit rate metrics in OceanBase Database's shared storage mode.
Note
The following monitoring metrics are applicable to the OceanBase Database shared storage mode, and the OceanBase cluster version must be ≥ 4.6.2.0. The collection condition is ob_mode_is_shared_storage (collected only in shared storage mode).
ob_ss_macro_cache_hit_ratio
Metric description
The overall macroblock cache hit rate in OceanBase Database's shared storage mode.
Parameter description
Metrics |
Metric Name |
unit |
|---|---|---|
| ob_ss_macro_cache_hit_ratio | ob_ss_macro_cache_hit_ratio | % |
Calculation formula
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 collection
The underlying metrics ob_ss_macro_cache_hit_cnt and ob_ss_macro_cache_miss_cnt are derived from the macroblock cache statistics in OceanBase Database's shared storage mode:
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 = ?
Applicable versions: OceanBase V4.6.2.0 and later (shared storage mode)
ob_ss_macro_cache_meta_hit_ratio
Metric description
The Meta macroblock hit rate in OceanBase Database's shared storage mode.
Parameter description
Metrics |
Metric Name |
unit |
|---|---|---|
| ob_ss_macro_cache_meta_hit_ratio | ob_ss_macro_cache_meta_hit_ratio | % |
SQL collection
OceanBase V4.3.5.1 and later (shared storage mode):
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
Metric description
The hit rate of macroblocks in temporary files in OBSS mode.
Metric parameters
Metrics |
Metric Name |
unit |
|---|---|---|
| ob_ss_macro_cache_tmp_file_hit_ratio | ob_ss_macro_cache_tmp_file_hit_ratio | % |
SQL collection
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
Metric description
The hit rate of auto-type macroblocks in OBSS mode.
Metric parameters
Metrics |
Metric Name |
unit |
|---|---|---|
| ob_ss_macro_cache_auto_hit_ratio | ob_ss_macro_cache_auto_hit_ratio | % |
SQL collection
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
Metric description
The hit rate of macroblocks in hotspot tablets in OBSS mode.
Metric parameters
Metrics |
Metric Name |
unit |
|---|---|---|
| ob_ss_macro_cache_hot_macro_hit_ratio | ob_ss_macro_cache_hot_macro_hit_ratio | % |
SQL collection
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
Metric description
The hit rate of private macroblocks in OBSS mode.
Metric parameters
Metrics |
Metric Name |
unit |
|---|---|---|
| ob_ss_private_macro_hit_ratio | ob_ss_private_macro_hit_ratio | % |
SQL collection
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
Metric description
The hit rate of shared macroblocks in OBSS mode.
Metric parameters
Metrics |
Metric Name |
unit |
|---|---|---|
| ob_ss_share_macro_hit_ratio | ob_ss_share_macro_hit_ratio | % |
SQL collection
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
Metric description
The hit rate of external table macroblocks in OBSS mode.
Metric parameters
Metrics |
Metric Name |
unit |
|---|---|---|
| ob_ss_external_table_disk_cache_hit_ratio | ob_ss_external_table_disk_cache_hit_ratio | % |
SQL collection
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)
