Lock policy configuration
For applications that require high-performance vector search, you can improve search efficiency by locking the vector index in memory. To do this, modify the online table configurations as follows:
-
On the deployment management page, click a searcher worker.
-
Under online table configurations, select the target index table and click modify.
-
In the load_config section, add the following configuration. For more details, see Index table loading policy:
{
"file_patterns": [
"/index/${your_vector_index_name}"
],
"load_strategy": "mmap",
"load_strategy_param": {
"slice": 409600,
"lock": true,
"interval": 2
}
},
-
After you save the changes, the cluster performs a rolling upgrade based on the minimum service ratio specified in the online configurations.
For example, the minimum service ratio in the online configurations is set to 50.
Therefore, when managing a production cluster, ensure the minimum service ratio is greater than 0. Also, verify that the remaining searcher workers can handle the full traffic load during the rolling upgrade.
Usage notes
-
Locking a vector index in memory consumes memory on the searcher worker. Apply this lock policy only if your searcher workers have sufficient memory.