# Managed Elastic search for billion scale dense vector index and performance

**URL:** <https://discuss.elastic.co/t/managed-elastic-search-for-billion-scale-dense-vector-index-and-performance/316312>\
**Category:** Elasticsearch\
**Tags:** vector-search\
**Created:** [October 11, 2022, 10:10am UTC](https://discuss.elastic.co/t/managed-elastic-search-for-billion-scale-dense-vector-index-and-performance/316312 "2022-10-11T10:10:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cvgoudar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cvgoudar/32/111926_2.png) [@cvgoudar](https://discuss.elastic.co/u/cvgoudar)\
**Post date:** [October 11, 2022, 10:10am UTC](https://discuss.elastic.co/t/managed-elastic-search-for-billion-scale-dense-vector-index-and-performance/316312/1 "2022-10-11T10:10:36Z")

</div>

We want to understand on the requirements and expected response time for vector based search with close to 1 Billion semantic vector index. The dense vector is 768 dimensional.

What would be the appropriate configuration of Managed Elastic search to get response with knn search within 100-200 ms response time. We would like to get close to Top 20 matches with vector similarity.

Also will there be performance impact if filter option is used

---

<div class="post-metadata">

**Author:** ![Julie\_Tibshirani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julie_tibshirani/32/55628_2.png) [@Julie\_Tibshirani](https://discuss.elastic.co/u/Julie_Tibshirani)\
**Post date:** [November 7, 2022, 11:39pm UTC](https://discuss.elastic.co/t/managed-elastic-search-for-billion-scale-dense-vector-index-and-performance/316312/2 "2022-11-07T23:39:53Z")

</div>

Hello @cvgoudar, unfortunately we don't have published benchmarks for this configuration (1 billion vectors with 768 dimensions). To determine if the performance will be acceptable, our recommendation is to test your dataset + queries using a benchmarking framework like Elasticsearch rally ([https://esrally.readthedocs.io](https://esrally.readthedocs.io)). You can start with a single node, fitting as many vectors as possible into it, and then calculate how many nodes you will need for the full 1 billion vector dataset. Here are some resources that can help:

- The kNN search tuning guide: [Tune approximate kNN search | Elasticsearch Guide [8.5] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.5/tune-knn-search.html). This guide explains that memory is a primary bottleneck for vector search -- you need to have enough RAM available on the node to hold all the vector data in page cache.
- In an upcoming release, we'll add a support for lower-precision vector element types: [https://github.com/elastic/elasticsearch/pull/90774](https://github.com/elastic/elasticsearch/pull/90774). This is sometimes called "quantization" and can really help reduce memory requirements for large datasets like yours.

About filtering: yes, approximate kNN search is usually slower when using a 'filter'. This is because the search needs to skip over documents that do not match the filter. If a filter is very selective (meaning it matches few documents), the performance impact can be greater. If you are always using a filter and it's quite selective, then you should check whether exact kNN search ([k-nearest neighbor (kNN) search | Elasticsearch Guide [8.5] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.5/knn-search.html#exact-knn)) is a better fit for your use case.

---

<div class="post-metadata">

**Author:** ![ruslaniv](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@ruslaniv](https://discuss.elastic.co/u/ruslaniv)\
**Post date:** [November 25, 2022, 6:51am UTC](https://discuss.elastic.co/t/managed-elastic-search-for-billion-scale-dense-vector-index-and-performance/316312/3 "2022-11-25T06:51:05Z")

</div>

I'd be VERY cautious and run extensive testing before indexing this large of a dataset. Check this discussion: [Dense vector field space requirements](https://discuss.elastic.co/t/dense-vector-field-space-requirements/316304/1)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 23, 2022, 6:51am UTC](https://discuss.elastic.co/t/managed-elastic-search-for-billion-scale-dense-vector-index-and-performance/316312/4 "2022-12-23T06:51:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
