Why does search speed suffer (and RAM consumption increases) when there are a large number of vectors in Weaviate?

Hi, Weaviate community!

Weaviate version: 1.25.25 (and 1.26.13 for other instance)
Index Type: HNSW
Named vectors: 2
Lengths of vectors: 768 and 1024
ef = 320 and 480
efConstruction = 320 and 480
maxConnections = 100 and 120
Load Test (for measuring QPS and Recall) using .pkl files.
Limit: 10
Max CPU: 40 cores
Max RAM: 443 GB (on tests weaviate takes up to 60%)
Env vars:
LIMIT_RESOURCES: ‘true’
PERSISTENCE_HNSW_MAX_LOG_SIZE: 4GiB
ASYNC_INDEXING: ‘true’
GOGC: 90

on number of vectors 5 million - average search speed - 200 obj/s
on number of vectors 20 million - average search speed - 60-70 obj/s on start and goes up to 160-170 obj/s.

On every starting search queries Weaviate increases RAM consumption (sometimes decreases) and performance on start is poor, what impacts on final results. Why is that?

Hi @DevelMyCry,

Have you upgraded to Weaviate version 1.28.2 to see if it offers any performance improvements?

Do you have multiple nodes setup right? Furthermore, it might not be direct but have you tried to set ef to dynamic ef = -1?

Hope this helps!

Regards,
Mohamed Shahin
Weaviate Support

Hi @Mohamed_Shahin,

No, I haven’t. This will be problematic.
My Weaviate instance is running on one node, in standalone. I don’t have tried it (dynamic ef=-1).

I would recommend attempting dynamic EF, as it is mutable and can be adjusted as needed

If you can schedule downtime during low traffic (since you currently have a single-node setup), upgrading to the latest version of Weaviate would be beneficial. I strongly recommend scaling moving to a multi-node configuration with at least three nodes. This would provide significant performance improvements and resilience minimizing downtime as well - 3 nodes serve will be much performant than one node also traffic will be disturbed without pressure on one node.

If you can plan for this, it could make a big difference!

Regards,
Mohamed Shahin
Weaviate Support