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

**URL:** <https://forum.weaviate.io/t/why-does-search-speed-suffer-and-ram-consumption-increases-when-there-are-a-large-number-of-vectors-in-weaviate/9659>\
**Category:** General\
**Created:** [January 10, 2025, 8:29am UTC](https://forum.weaviate.io/t/why-does-search-speed-suffer-and-ram-consumption-increases-when-there-are-a-large-number-of-vectors-in-weaviate/9659 "2025-01-10T08:29:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DevelMyCry](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@DevelMyCry](https://forum.weaviate.io/u/DevelMyCry)\
**Post date:** [January 10, 2025, 8:29am UTC](https://forum.weaviate.io/t/why-does-search-speed-suffer-and-ram-consumption-increases-when-there-are-a-large-number-of-vectors-in-weaviate/9659/1 "2025-01-10T08:29:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [January 14, 2025, 11:20am UTC](https://forum.weaviate.io/t/why-does-search-speed-suffer-and-ram-consumption-increases-when-there-are-a-large-number-of-vectors-in-weaviate/9659/2 "2025-01-14T11:20:38Z")

</div>

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?

> **[Vector Indexing | Weaviate](https://weaviate.io/developers/weaviate/concepts/vector-index)**
>
> What is vector indexing? It's a key component of vector databases that helps to significantly increase the speed of the search process of similarity search with only a minimal tradeoff in search accuracy (HNSW index), or efficiently store many...

Hope this helps!

Regards,  
Mohamed Shahin  
Weaviate Support

---

<div class="post-metadata">

**Author:** ![DevelMyCry](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@DevelMyCry](https://forum.weaviate.io/u/DevelMyCry)\
**Post date:** [January 14, 2025, 12:49pm UTC](https://forum.weaviate.io/t/why-does-search-speed-suffer-and-ram-consumption-increases-when-there-are-a-large-number-of-vectors-in-weaviate/9659/3 "2025-01-14T12:49:24Z")

</div>

Hi @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).

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [January 14, 2025, 2:35pm UTC](https://forum.weaviate.io/t/why-does-search-speed-suffer-and-ram-consumption-increases-when-there-are-a-large-number-of-vectors-in-weaviate/9659/4 "2025-01-14T14:35:50Z")

</div>

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

> **[Collection definition | Weaviate](https://weaviate.io/developers/weaviate/config-refs/schema#mutability)**
>
> Schema Configuration in Weaviate

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
