Short answer: Forecast hot vector count and peak search QPS separately—RAM bounds HNSW size, CPU bounds throughput—then plan shards, replicas, and headroom before the wall.
Cost optimization trims what you store; capacity planning decides how much room you need before growth forces an emergency resize. Agent memory volumes rise with users, sessions, and retained facts—not raw chat logs alone. Weaviate Engram turns accepted writes into committed memories with vectors that drive RAM; search concurrency drives CPU. Mixing those signals leads to buying the wrong lever. This chapter covers turning vector counts into RAM and node plans with quantization in mind, topology decisions that must happen before you are large (replicas for QPS, shards or disk-oriented indexes for footprint), and feeding the model with Engram accept/commit/search telemetry. Multi-tenant capacity is active-tenant count times per-tenant footprint plus a plan for inactive and offloaded tenants. Align backup sizes and restore times with the forecast so DR objectives stay honest.
Cost optimization trims what you store. Capacity planning decides how much room you need before growth forces an emergency resize. Agent memory volumes rise with users, sessions, and retained facts—not with raw chat logs alone. Weaviate Engram turns accepted writes into committed memories with vectors. Those vectors drive RAM. Search concurrency drives CPU. This chapter shows how to forecast both, when to plan shards and replicas ahead of pain, and how to keep headroom so seasonal spikes do not become outages.
What Should You Forecast When Memory Volumes Grow?
Separate size from speed. Memory capacity is mostly about how many vectors must stay hot. Query capacity is about how many searches you must serve at peak. Weaviate’s guidance is blunt: RAM bounds dataset size for HNSW. CPU bounds import and query throughput. Mixing those signals leads to buying the wrong lever.
For Engram products, start from accepted writes that pass your cost gates, not from every chat message. Estimate memories created per active user per month. Multiply by active users at the planning horizon. Add a factor for reconciliation updates that rewrite objects without adding users. That yields a vector-count forecast. Dimensions come from the embedding model Engram uses for your project. Change models only with a migration plan, because dimensions rewrite the math.
Also forecast pipeline pressure. Extract and transform spend scales with accept rate. A quiet store with a red run queue is still under-capacity in the wrong place. Track failed runs and commit lag beside vector counts.
How Do You Turn Vector Counts Into RAM and Node Plans?
A practical rule of thumb is that holding vectors in memory needs on the order of twice the raw float footprint once HNSW graph overhead is included. One million 384-dimensional float32 vectors are about 1.5 GB raw and roughly 3 GB with the simple doubling rule. Higher dimensions scale linearly. Quantization can cut that sharply. Plan the compressed case only after you have measured recall on your own canaries.
Multiply by replication factor for high availability. Three replicas mean three copies of the hot working set across the cluster, not one. Leave headroom. Industry practice often keeps peak utilization near seventy percent of planned capacity so compaction, repairs, and ingest bursts still fit. Size for peak search QPS, not average. If peak is three times average, the average-friendly box fails on launch day.
Managed Engram hides node shopping lists. You still need growth alerts on memory object counts, search latency, and run failures so you upgrade tiers before users feel amnesia. Self-hosted clusters set GOMEMLIMIT near eighty to ninety percent of instance RAM and watch for approaching limits.
Which Topology Decisions Must Happen Before You Are Large?
Shard count for single-tenant collections is fixed at creation. If you expect to outgrow one node, create more shards than you have nodes at the start so you can expand later. Academy guidance shows starting with extra shards on fewer nodes, then adding machines as each shard grows. Waiting until you are memory-bound and then wishing for more shards is a migration project, not a config tweak.
Replication and sharding solve different forecasts. Growing QPS with a dataset that still fits suggests replicas. Growing vectors beyond comfortable RAM suggests shards, quantization, or disk-oriented indexes. Growing both suggests both, budgeted honestly. Replica movement can rebalance placement after you add nodes. It does not invent new shard counts.
Multi-tenant shapes change the spreadsheet. Each tenant is its own shard. Capacity becomes active-tenant count times per-tenant footprint, plus a plan for inactive and offloaded tenants from the cost chapter. Do not provision every historical tenant as forever-hot.
How Can Engram Telemetry Feed the Capacity Model?
Instrument accepts, commits, and searches per environment. Sample memory growth weekly. Compare forecast to actuals and adjust the memories-per-user assumption. When you change topic configs or admission filters, expect a kink in the curve. Annotate it.
Here is a bookmobile route desk that records growth samples into Weaviate Engram itself and recalls the recent capacity narrative before a planning meeting. The numbers are product telemetry. Engram keeps the planning memory durable across staff changes.
import os
from datetime import date
from engram import EngramClient, HybridRetrieval
client = EngramClient(api_key=os.environ["ENGRAM_API_KEY"])
group = "mobile_library"
librarian = "librarian-kate"
route = "bookmobile-route-7"
def log_capacity_snapshot(
active_users: int,
accepts_7d: int,
memories_total: int,
search_p95_ms: float,
forecast_vectors_90d: int,
) -> str:
note = (
f"Route {route} capacity snapshot on {date.today().isoformat()}: "
f"{active_users} active patrons, {accepts_7d} Engram accepts in 7d, "
f"{memories_total} memories stored, search p95 {search_p95_ms:.0f}ms, "
f"90-day vector forecast {forecast_vectors_90d}."
)
run = client.memories.add(
[
{"role": "user", "content": note},
{"role": "assistant", "content": "Logged bookmobile capacity snapshot."},
],
user_id=librarian,
group=group,
properties={"route_id": route, "cost_center": "outreach"},
)
return run.run_id
def recall_capacity_context() -> list[str]:
hits = client.memories.search(
query="What recent capacity snapshots and vector forecasts apply to bookmobile route 7?",
user_id=librarian,
group=group,
properties={"route_id": route},
retrieval_config=HybridRetrieval(limit=5),
)
return [m.content for m in hits]
# Example weekly job inputs from metrics systems
rid = log_capacity_snapshot(
active_users=1280,
accepts_7d=9400,
memories_total=210_450,
search_p95_ms=48.0,
forecast_vectors_90d=320_000,
)
print({"run_id": rid, "planning_context": recall_capacity_context()})
Feed the same snapshot fields into your spreadsheet or dashboard. Engram makes the narrative searchable when someone asks why you ordered nodes last quarter.
When Should You Revisit the Plan?
Replan when embedding dimensions change, when you enable or tighten quantization, when replication factor changes, or when a product launch multiplies active users. Replan when search p95 climbs while CPU is low. That often means memory pressure or cold wakes, not a missing core. Replan when accept filters change. Cheaper writes flatten the curve; looser filters steepen it overnight.
Keep staging sized as a scaled shadow of production assumptions, not as a toy. Capacity bugs that only appear at production volume are still capacity bugs. Align backup sizes and restore times with the forecast so disaster recovery objectives remain honest as the store grows.
Capacity planning for memory is a living model of vectors, peak QPS, replicas, and shards with explicit headroom. Measure Engram growth. Convert counts to RAM with quantization in mind. Expand topology before the wall. Index maintenance then keeps that planned capacity healthy as the background work of a living store continues.
Our next chapter, How do you handle index maintenance and background optimization?, covers the ongoing compaction, repair, and index hygiene jobs that protect recall and latency after you have sized the cluster for growth.