Lock policy for vector indexes

更新时间:
复制 MD 格式

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:

  1. On the deployment management page, click a searcher worker.

  1. Under online table configurations, select the target index table and click modify.

  1. 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
        }
      },
  1. 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.