이 글은 DiskANN이라는 디스크 기반 인덱싱 알고리즘을 소개한다. DiskANN은 Vamana 그래프를 기반으로 하며, 대규모 데이터셋 내 효율적인 검색을 지원한다. 질의 성능을 향상시키기 위해, 각 벡터 필드의 인덱스 유형을 지정할 수 있다.
queryNode.enableDisk 값을 false로 설정하면 됨. 활성화하려면, queryNode.enableDisk 값을 true로 설정./var/lib/milvus/data임./var/lib/milvus/data임.DiskANN을 사용한다면 아래와 같은 제약사항 존재
DISKANN 로 설정. index parameters는 따로 없다| Parameter | Description | Range | Default Value |
|---|---|---|---|
search_list | Size of the candidate list, a larger size offers a higher recall rate with degraded performance. | [topk, int32_max] | 16 |
DiskANN 관련 파라미터는 ${MILVUS_ROOT_PATH}/configs/milvus.yaml 파일에서 수정하여 성능을 향상시킬 수 있다.
...
DiskIndex:
MaxDegree: 56
SearchListSize: 100
PQCodeBugetGBRatio: 0.125
SearchCacheBudgetGBRatio: 0.125
BeamWidthRatio: 4.0
...
| Parameter | Description | Value Range | Default Value |
|---|---|---|---|
MaxDegree | Maximum degree of the Vamana graph.A larger value offers a higher recall rate but increases the size of and time to build the index. | [1, 512] | 56 |
SearchListSize | Size of the candidate list.A larger value increases the time spent on building the index but offers a higher recall rate.Set it to a value smaller than MaxDegree unless you need to reduce the index-building time. | [1, int32_max] | 100 |
PQCodeBugetGBRatio | Size limit on the PQ code.A larger value offers a higher recall rate but increases memory usage. | (0.0, 0.25] | 0.125 |
SearchCacheBudgetGBRatio | Ratio of cached node numbers to raw data.A larger value improves index-building performance with increased memory usage. | [0.0, 0.3) | 0.10 |
BeamWidthRatio | Ratio between the maximum number of IO requests per search iteration and CPU number. | [1, max(128 / CPU number, 16)] | 4.0 |
How to deal with the
io_setup() failed; returned -11, errno=11:Resource temporarily unavailableerror?The Linux kernel provides the Asynchronous non-blocking I/O (AIO) feature that allows a process to initiate multiple I/O operations simultaneously without having to wait for any of them to complete. This helps boost performance for applications that can overlap processing and I/O.
The performance can be tuned using the
/proc/sys/fs/aio-max-nrvirtual file in the proc file system. Theaio-max-nrparameter determines the maximum number of allowable concurrent requests.The
aio-max-nrdefaults to65535, you can set it up to10485760.