首批通过分布式安全可靠测评,为关键业务系统打造
storage_meta_cache_priority
更新时间:2026-06-22 11:40:53
说明
该配置项从 V4.2.0 版本开始引入。
功能描述
storage_meta_cache_priority 用于控制 kvcache 中存储 Meta Cache 的优先级。
权限要求
查询配置项
sys租户和所有用户租户均可以使用SHOW PARAMETERS语句或视图GV$OB_PARAMETERS查询该配置项。修改配置项
仅
sys租户可以修改该配置项,用户租户不能修改该配置项。
属性说明
| 属性 | 描述 |
|---|---|
| 参数类型 | Int |
| 默认值 | 10 |
| 取值范围 | [1,+∞) |
| 是否可修改 | 是,支持通过 ALTER SYSTEM SET 语句修改。 |
| 是否重启 OBServer 节点生效 | 否,设置后立即生效。 |
使用说明
OceanBase 数据库将 Table Store、SSTable 等元数据统一抽象为存储 Meta,并将其放入 kvcache 内存中统一管理。当出现 Meta Cache 使用不高或频繁未命中的时候,用户可以根据负载的特征,改变其优先级,使得有限 kvcache 内存资源的使用效率更高,更灵活。
在 kvcache 中,Cache 的优先级数值越大,优先级越高,占用的内存越不容易被淘汰。已有的几种 Cache 类型的优先级配置项如下:
tablet_ls_cache_priority,其默认值为 1000,取值范围为 [1,+∞)。
opt_tab_stat_cache_priority,其默认值为 1,取值范围为 [1,+∞)。
index_block_cache_priority,其默认值为 10,取值范围为 [1,+∞)。
user_block_cache_priority,其默认值为 1,取值范围为 [1,+∞)。
user_row_cache_priority,其默认值为 1,取值范围为 [1,+∞)。
bf_cache_priority,其默认值为 1,取值范围为 [1,+∞)。
fuse_row_cache_priority,其默认值为 1,取值范围为 [1,+∞)。
需要注意的是,存储 Meta 优先级的缺省值与 index_block_cache_priority 一致,仅次于 tablet_ls_cache_priority。
配置示例
设置 kvcache 中存储 Meta Cache 的优先级为 10。
obclient> ALTER SYSTEM SET storage_meta_cache_priority='10';