Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 1022 Bytes

File metadata and controls

63 lines (43 loc) · 1022 Bytes

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"
}