Skip to content

A tiny gRPC server written in go to calculate Chroma DB memory requirements.

License

Notifications You must be signed in to change notification settings

amikos-tech/chroma-sizing-estimator

Repository files navigation

Chroma Sizing Calculator

This is a tiny experiment in calculating ChromaDB memory requirement based on input number of vectors and dimensionality of vectors over a gRPC interface.

Usage

Standalone server:

make build

Run server:

make run

Build docker image:

make docker-build

Run docker image:

make docker-run

Testing

Testing with System Buffer Memory Size (20% of total memory):

grpcurl -plaintext -d '{"number_of_vectors": 1000000, "vector_dimensions": 128}' localhost:8080 calculator.CalculatorService/Calculate

Should return:

{
  "memorySizeEstimate": 0.47683716,
  "estimateUnit": "GB"
}

Testing with System Buffer Memory Size (30% of total memory):

grpcurl -plaintext -d '{"number_of_vectors": 1000000, "vector_dimensions": 128, "system_memory_overhead": 0.3}' localhost:8080 calculator.CalculatorService/Calculate

Should return:

{
  "memorySizeEstimate": 0.6198883,
  "estimateUnit": "GB"
}

About

A tiny gRPC server written in go to calculate Chroma DB memory requirements.

Resources

License

Stars

Watchers

Forks

Packages