Note
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 query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.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 SSTable into storage Meta and manages it in the kvcache. When the Meta Cache is not frequently accessed or frequently misses, you can change its priority based on the workload characteristics to improve the utilization of limited kvcache memory resources and make them more flexible.
In the kvcache, the higher the priority value, the higher the priority, and the less likely the cache is to be evicted. The following table lists the priority parameters for different cache types:
tablet_ls_cache_priority. The default value is 1000, and the value range is [1,+∞).
opt_tab_stat_cache_priority. The default value is 1, and the value range is [1,+∞).
index_block_cache_priority. The default value is 10, and the value range is [1,+∞).
user_block_cache_priority. The default value is 1, and the value range is [1,+∞).
user_row_cache_priority. The default value is 1, and the value range is [1,+∞).
bf_cache_priority. The default value is 1, and the value range is [1,+∞).
fuse_row_cache_priority. The default value is 1, and the value range is [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';