Overview
ob_vector_index_active_segment_max_size controls the maximum memory usage for active incremental segments within a single partition. When the memory occupied by newly written vector data in an active incremental segment exceeds this threshold, the system triggers freezing and persistence operations to flush the incremental data from memory to disk.
Privilege requirements
Query parameters
Both the
systenant and user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.Modify parameters
Both the
systenant and user tenants can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Cap |
| Default Value | 0 indicates adaptive. The system automatically sets different thresholds based on the tenant's available vector memory:
|
| Value range | [0, +∞), in MB |
| Modifiable | Yes, you can use theALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
- Increase the threshold: This can reduce the frequency of freezes and prevent the generation of excessive active incremental segments when incremental write speeds are too high, which could degrade search performance.
- Lower the threshold: Unless in special test scenarios, it is not recommended to lower the threshold. This is to avoid excessive freeze operations that could impact overall search performance.
- Restart the database: When restarting a database, the system needs to restore data in memory. A large threshold will increase the restart recovery time. Before restarting, it is recommended to lower the threshold to reduce the restart recovery time. Alternatively, perform the restart during off-peak business hours.
Configuration example
Set the maximum memory usage for the active segment of a vector index in a single partition to 256 MB.
ALTER SYSTEM SET ob_vector_index_active_segment_max_size = '256MB';
View the current configuration.
SHOW PARAMETERS LIKE 'ob_vector_index_active_segment_max_size';