Note
For V4.2.0, this parameter is available starting with V4.2.0.
Description
storage_meta_cache_priority specifies the priority of the storage meta cache in the kvcache.
Privilege requirements
Query the parameter
The
systenant and all user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.Modify the parameter
Only the
systenant can modify this parameter. User tenants cannot modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 10 |
| Value range | [1, +∞) |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
OceanBase Database abstracts metadata such as Table Store and SSTables into storage meta and manages it in the kvcache. When the usage of the meta cache is low or when the cache frequently misses, you can change the priority of the cache based on the workload characteristics to improve the efficiency of the limited kvcache memory resources and make them more flexible.
In the kvcache, a higher priority value indicates a higher priority and less likelihood of being evicted from memory. The following table lists the priority parameters for different cache types:
tablet_ls_cache_priority, which has a default value of 1000 and a value range of [1, +∞).
opt_tab_stat_cache_priority, which has a default value of 1 and a value range of [1, +∞).
index_block_cache_priority, which has a default value of 10 and a value range of [1, +∞).
user_block_cache_priority, which has a default value of 1 and a value range of [1, +∞).
user_row_cache_priority, which has a default value of 1 and a value range of [1, +∞).
bf_cache_priority, which has a default value of 1 and a value range of [1, +∞).
fuse_row_cache_priority, which has a default value of 1 and a value range of [1, +∞).
Note that the default value of the storage meta cache priority is the same as that of index_block_cache_priority, which is the second highest after tablet_ls_cache_priority.
Examples
Set the priority of the storage meta cache in the kvcache to 10.
obclient> ALTER SYSTEM SET storage_meta_cache_priority='10';