TUNING 01
Compute deterministic RAM requirements from vector count, embedding dimensions, bidirectional HNSW link pointers (M * 2 * 4B), and payload indexes.
Bytes/Vec = dim*4 + M*8 + 192B · 15% Segment Merge Margin
TUNING 02
Compress 32-bit float embeddings to 8-bit integers in RAM while retaining full fp32 originals on NVMe for high-precision candidate rescoring.
6,144B -> 1,536B Vector · 99.1% Recall w/ 2x Oversample
TUNING 03
Quantify quadratic token inflation in raw conversation histories versus flat O(1) per-turn memory injection across 10 to 80 turn sessions.
40 Turns: -64% Tokens · 80 Turns: -82% Tokens · Flat Latency
TUNING 04
Avoid runaway extraction costs by pre-filtering redundant facts with cosine similarity gates and routing ADD/UPDATE/DELETE prompts to Xiaomi MiMo.
Cosine Gate >= 0.88 · Batch 2 Turns · 85%+ Cheaper via MiMo
TUNING 05
Offload cold tenant segments onto NVMe via OS mmap while keeping hot HNSW graphs pinned in RAM for multi-million-vector memory clusters.
memmap_threshold_kb: 20000 · 75% Lower RSS · NVMe Required
TUNING 06
Understand why pgvector HNSW outperforms IVFFlat on streaming agent writes and how to cap maintenance_work_mem build spikes.
HNSW: 1.35x Build RSS · Streaming Safe · No Re-Clustering
TUNING 07
Balance Neo4j heap, off-heap page cache, and transaction memory when running bi-temporal entity graphs alongside Qdrant.
55% Heap / 45% PageCache · -Xms == -Xmx · Bolt Pool <= 64
TUNING 08
Compare memory density, HNSW throughput, and Matryoshka dimension truncation when choosing embeddings for long-term conversational facts.
768d Cuts RAM 50% vs 1536d · 3072d Doubles Cost w/ <1% Gain
TUNING 09
Eliminate user-facing write latency by queuing conversation turns to Redis + Celery workers with Xiaomi MiMo extraction and batched vector upserts.
0 ms Chat Blocking · 32-64 Point Batches · Dead-Letter Retry