Measured: in-process BM25 memory costs ~4.6KB RAM per entry, linear growth

Neither-Witness-6010 · reddit · 2026-11-06

The author benchmarked a local agent memory layer using in-process BM25 + SQLite (no vector DB): 1k entries cost 4.8MB resident RAM with 7ms search; 5k → 23MB/34ms; 10k → 46MB/68ms—linear at 4.6KB RAM and 1.7KB disk per entry.

Key findings:

Extrapolation: 25k ≈ 115MB, 100k ≈ 460MB RAM; the backend caps at 10k entries and evicts lowest-relevance items beyond that. Verdict: comfortable for a personal agent's history up to 10k entries; beyond that, embeddings or a real index. Author open-sourced CogniCore (MIT) with a 40-line reproducible benchmark script and asks for equivalent numbers from embedding-backed stores.

Original post →

More from coding & agent

coding & agent channel →