Skip to main content

Resourcing Overview

Onyx Lite

Onyx Lite uses under 1GB of memory at baseline. Disk and memory usage scale with the number of files users upload to the system, since PostgreSQL handles file storage in Lite mode.

Onyx Standard

OpenSearch enforces a read-only block on indices when disk usage hits the flood stage watermark (default 95%), which effectively blocks all writes. Monitor disk usage and plan capacity accordingly.

Local Deployment (Docker)

You can control the resources available to Docker in the Resources section of the Docker Desktop settings menu.
Often old, unused Docker images take up sizeable disk space. To clean up dangling images, run docker image prune.

Cloud Providers (AWS, GCP, etc.)

For small to mid scale deployments, we recommend deploying Onyx to a single instance in your cloud provider of choice.

Onyx Lite

Onyx Standard

Container-Specific Resourcing (Standard)

For more efficient scaling, you can dedicate resources to each Onyx container using Kubernetes, such as AWS EKS or Google GKE. The Terraform modules for AWS, GCP, and Azure include node pool sizes for small, medium, and large deployments. See the Onyx Helm chart values.yaml for our default requests and limits. The chart’s sizing guide has small, medium, and large values snippets.
If you are using cloud-based embedding models (e.g. OpenAI, Cohere, etc.) instead of locally hosted ones, the indexing_model_server and inference_model_server will use significantly less memory.
All together, this comes out to a total available node size of at least ~12 CPU and ~24GB of Memory.

Container-Specific Resourcing (Lite)

Docker Compose Lite starts six services. File storage, cache data, and sessions use PostgreSQL.
Memory usage in Lite mode scales with the number of user-uploaded files, since PostgreSQL handles file storage, caching, and session management. The code interpreter can use additional resources when it runs code. Helm Lite starts additional workloads unless you disable them explicitly; see the Helm Lite configuration.

OpenSearch Sizing

In Standard mode, OpenSearch is the component that grows with your data. OpenSearch stores the indexed documents and runs the searches. The other Onyx components keep the sizes in the tables above.

Sizing Calculator

Use the calculator to estimate the OpenSearch storage, memory, and cluster size for your data. Step 1 estimates what your data needs. Start from your total storage, from the item count of each source, such as 2 million Google Docs, or from your number of employees. Step 2 puts that data on OpenSearch nodes and sizes them for your peak search load. The calculator divides your data into chunks. A chunk holds up to 512 tokens of text, about 1,900 characters. For each chunk, OpenSearch keeps the text, its metadata, a keyword index, and one embedding vector. Vector search reads the vectors from memory, so the memory need grows with the number of chunks and the embedding size.
The calculator gives a planning estimate. Real chunk counts depend on your documents. Each short document, such as a chat thread or a ticket, uses at least one chunk, so many short documents raise the count. Total storage counts no chunks for images. Onyx indexes each image as one chunk, so if you index many images, use Each source. After the first indexing run, compare the estimate with the index size that OpenSearch reports.

Memory

OpenSearch uses memory in two parts: the JVM heap and the OS file cache. The heap runs indexing and searches. The file cache keeps index files in memory. Vector search reads the embedding vectors from the file cache, so the file cache must hold the vector memory that the calculator shows. For self-managed OpenSearch, set the heap with OPENSEARCH_JAVA_OPTS (Docker Compose) or opensearchJavaOpts (Helm):
  • Set Xms and Xmx to the same value, at most 50% of the node’s RAM.
  • Keep the heap at or below 31 GB. Above about 32 GB, Java turns off compressed object pointers, and performance drops.
  • When you give OpenSearch more RAM, raise the heap setting to match. The defaults are 2 GB (Docker Compose) and 4 GB (Helm).
Amazon OpenSearch Service sets the heap for you.

Storage

OpenSearch storage depends on the number of chunks and the embedding model, not on the size of your files. Most file bytes are images, fonts, and layout, and Onyx does not index them. Indexes created before Onyx 5.0 also store a title vector, so they use up to twice the vector storage until a reindex builds a new index. A later release stops storing a second copy of the text and saves about 500 bytes per chunk. Each copy of the data uses this storage again. Keep room for a second index: a change of embedding model or quantization builds a new index while the old one serves search.
OpenSearch stops placing shards on a node at 85% disk use and makes indexes read-only at 95%. Amazon OpenSearch Service blocks writes when a node has less than 20% or 20 GiB free, whichever is smaller. Deletes are blocked too, so you cannot free space from Onyx. Add storage before a node reaches 85%.
To see the real size of your index, run this request against OpenSearch:
docs.count is the number of chunks. pri.store.size is the size of one copy.

When to Scale

You can add data nodes, storage, memory, and replicas later without a reindex. The number of primary shards is fixed when Onyx creates the index. To change it, Onyx must build a new index.

Example

500 GB of storage with the default storage mix holds about 35 GB of text, or 18.6 million chunks. With 30% growth, the calculator plans for 24 million chunks. The shard count makes the shard copies divide evenly over the nodes, so no node holds more than its share. 1-bit quantization needs OpenSearch 3.6 or later. It stores vectors 32× smaller, so the memory for vector search drops about 18× in this example (the graph links stay the same size). Storage barely changes. At 1 question per second, the searches need about 37 vCPUs at peak. The 2 nodes that hold the data have 32 vCPUs as memory-optimized nodes, so the calculator picks general-purpose nodes with 32 vCPUs each. With 1-bit quantization, the data fits on 16 GB nodes, but they have too few vCPUs, so the calculator picks 64 GB compute-optimized nodes. When search needs more nodes than there are shard copies, the calculator adds replicas, because a node without a shard copy does no search work. Onyx applies both settings when it creates an index. To change the replica count of an existing index, update the index setting number_of_replicas in OpenSearch.

Next Steps

Guide: Deploy Onyx Locally

Deploy Onyx locally with Docker.

Guide: Deploy on AWS

Deploy Onyx on an EC2 instance.

Guide: Deploy on GCP

Deploy Onyx on GKE with Terraform or on a Compute Engine VM.

Guide: Deploy on Azure

Deploy Onyx on an Azure VM.