---
title: "SS 宏块命中率 - 云平台 OCP V4.5.0 | OceanBase 文档中心"
description: SS 宏块命中率 本节介绍 OB SS 模式下宏块缓存命中率相关指标。 说明 以下监控分组适用于 OceanBase 共享存储（SS）模式 ，要求 OB 集群版本 ≥ 4.6.2.0 。采集条件为 ob_mode_is_shared_storage （仅在 SS 模式下采集）。 ob_ss_macro_cache_h…
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*lJTmRZ61jSUAAAAAAAAAAAAADiGDAQ/original) 云平台 OCPV 4.5.0

# SS 宏块命中率

更新时间：2026-08-03 16:09:20

[编辑](https://github.com/oceanbase/ocp-doc/edit/V4.5.0/zh-CN/1900.reference-guide/300.monitoring-indicator-reference/700.ai-cluster/200.shared-storage/100.ss-macro-hit.md)  

本节介绍 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 模式宏块缓存统计项导出：

```sql
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 模式）：

```sql
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 采集

```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 采集

```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 采集

```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 采集

```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 采集

```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 采集

```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)

```

 上一篇 下一篇 ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
