I want to know about the mmap structure. #33621
Replies: 5 comments 10 replies
-
If mmap is enabled, when you call collection.load(), the query node will download the index files to local. The default local path is configured by the localStorage.path + "/mmap" in the milvus.yaml. And maps the index files into memory, but the files are not immediately read from disk to physical RAM, so the memory usage is very low. The index files are read in a lazy manner. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response.
Does it mean that the index file of the index node is downloaded over time? |
Beta Was this translation helpful? Give feedback.
-
@yhmo ![]() |
Beta Was this translation helpful? Give feedback.
-
@yhmo Thank you again for the explanation. |
Beta Was this translation helpful? Give feedback.
-
@yhmo could you please help us to get the below answers. Current Setup Overview What could be the potential issue here and what can be tuned. also please help us to get the answer for below questions.
|
Beta Was this translation helpful? Give feedback.
-
Due to memory capacity issues, I upgraded from Milvus 2.3.12 to 2.4.4.
I changed the vector index type from SCANN to HNSW, and after the upgrade, the memory usage significantly decreased from 10G to about 1.7G, which is helpful.
However, I find something strange.
I understand that mmap stores pointer information of the file in memory, and the actual data is stored on disk instead of in memory. But currently, the total file size of mmap is about 200k.
Does this mean mmap does not store data in the file or that it stores data node and index node information? Is it possible that the physical memory allocation is still the same 13G as before the upgrade, and because there is plenty of free memory, it does not store data in the mmap directory?
Or should I understand it as something similar to the buffer pool (db cache) in an RDBMS? In other words, does it load data up to the capacity of physical memory, and when the load exceeds the physical memory capacity, it writes some of the existing memory data to the mmap directory?
Beta Was this translation helpful? Give feedback.
All reactions