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 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 the metadata of Table Store, SSTable, and other data types into storage meta data and stores the storage meta data in the kvcache. When the usage of the storage meta cache is low or the cache frequently misses, you can change the priority of the cache based on the load characteristics to improve the utilization of the limited kvcache memory resources and make them more flexible.
In the kvcache, the higher the priority value of a cache, the higher its priority and the less likely it is to be evicted from memory. The following table lists the priority parameters of the existing 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, +∞).
The default value of the storage meta cache priority is the same as that of the index_block_cache_priority parameter and is the second highest after the tablet_ls_cache_priority parameter.
Examples
Set the priority of the storage meta cache in the kvcache to 10.
obclient> ALTER SYSTEM SET storage_meta_cache_priority='10';