Skip to content

Opensearch Serverless - Vector Database OCU indexing scaling

0

Hello everyone!

I was looking for some help with the estimation for a not very large scenario.

Let's say that you have 1 index, with 100GB of data (FAISS, vector search), with 3-5 simultaneous searches, and peaks that could reach 15-20 simultaneous searches.

Roughly how many Search OCUs (and any other relevant OCUs like Indexing OCUs in a steady state) would this 100GB setup typically require for both normal and peak query loads? What would be an estimated monthly cost for this configuration, considering the varying load?

If I understood correctly, for regular "full search" (non-vector), you can base OCU needs on the 120GB disk storage per OCU by dividing the DB size by 120GB. But if I'm correct that this does not apply to vector databases, and for vector search, the index must fit entirely in RAM. Meaning, for vector DBs, you should calculate OCUs as DB size / 6GB (the RAM per OCU)?

Aditionaly to this I would like to make some questions based on my current setup:

Engine: faiss Size: ~ 8 GB. Vectors: Around 187k docs, 1536 dimensions, using FAISS (FP32, M=60, ef_construction=512, ef_search=512). Observed Minimum: Before, it was 2 search OCUs, but now it's always 4 Search OCUs, even when idle (we understand it might actually be a base of 3, but as it seems to scale in pairs, it results in 4). Our questions about the current setup:

One thing that I don't understand why is 4 OCUs the minimum now? Is it because our index size is now over 6GB, thus requiring an additional OCU which then gets doubled for availability?

Additionally, if I use managed OpenSearch clusters (provisioned instances) instead of Serverless, I understand that one r6g.2xlarge instance per AZ (so, 2 nodes total for 2 AZs) might be sufficient for the current requirements (the ~8GB index and similar query load). Is this a reasonable assumption?

For such a managed cluster setup, would it be necessary to configure Warm and Cold data storage, set a specific number of master nodes, or use dedicated coordinator nodes for this scale?

Thanks!

1 Answer
0

For your scenario with a 100GB vector index and 3-5 simultaneous searches (peaking at 15-20), the OpenSearch Serverless setup would likely require the following:

Search OCUs:

  • Normal load: Approximately 17-18 OCUs (100GB / 6GB per OCU, rounded up)
  • Peak load: Potentially scaling up to 20-25 OCUs to handle the increased query load

Indexing OCUs:

  • In a steady state with minimal updates, you might only need 1-2 Indexing OCUs.

Estimated monthly cost: The cost would vary based on usage, but you can expect it to be in the range of $3,000 to $5,000 per month, considering the fluctuating load and the need for both search and indexing OCUs.

Your understanding about vector databases is correct. For vector search, the entire index needs to fit in RAM, so you should calculate OCUs based on the 6GB RAM per OCU rather than the 120GB disk storage used for regular search collections.

Regarding your current setup:

The minimum of 4 Search OCUs you're observing is likely due to your index size being over 6GB. OpenSearch Serverless aims to maintain high availability, so it's providing an additional OCU and then doubling that for redundancy across availability zones. This results in the 4 OCU minimum you're seeing.

If you were to use managed OpenSearch clusters instead of Serverless, your assumption about using r6g.2xlarge instances is reasonable for your current ~8GB index and query load. Two nodes (one per AZ) should be sufficient to handle your requirements and provide high availability.

For this scale of managed cluster:

  • You likely don't need to configure Warm and Cold data storage yet.
  • A specific number of dedicated master nodes isn't necessary; you can use your data nodes as master-eligible nodes.
  • Dedicated coordinator nodes are typically not required at this scale.

However, as your data grows or if your query patterns become more complex, you may need to revisit these decisions and potentially add dedicated master or coordinator nodes.

Remember that while managed clusters give you more control, they also require more hands-on management compared to the Serverless option.

Sources
Amazon OpenSearch Serverless cost-effective search capabilities, at any scale | AWS Big Data Blog
Improve search results for AI using Amazon OpenSearch Service as a vector database with Amazon Bedrock | AWS Big Data Blog
Managing capacity limits for Amazon OpenSearch Serverless - Amazon OpenSearch Service
Opensearch Serverless scale related questions | AWS re:Post

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.