HNSW memory usage estimation #33424
-
Can I expect memory usage if I index a 100K entity by hnsw? The dimension is 3072, so I'm going to make M about 48 of the hnsw build parameters. If M is too big, I'd appreciate it if you could advise me how much would be appropriate for same recall rate. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
HNSW size is a bit larger than original vectors size. Each dimension value is a float32 type, so each dimension value occupies 4 bytes. https://milvus.io/docs/index.md#HNSW |
Beta Was this translation helpful? Give feedback.
HNSW size is a bit larger than original vectors size. Each dimension value is a float32 type, so each dimension value occupies 4 bytes.
original vectors size = 100K * 3072 * 4 Bytes = 1172MB
Then the HNSW size could be around 1200MB.
https://milvus.io/docs/index.md#HNSW
The range of M is (2, 2048). M=48 is ok, it is not a big value.