Files
leleka/deploy/rust-runtime
Pavlo RatushnyiandClaude Sonnet 5.5 2d7a5d8863 5090 profile: explicit prefix_cache_mib 6144 so freed host RAM cannot grow the prefix store
`auto` is 75 % of the memory that is elastic when the stack opens (ceiling 96 GiB), so it grows whenever RAM is freed
elsewhere (a sparse memfd frees ~36.6 GiB: auto would become ~30 GiB). 6144 MiB is what auto resolves to on this host
today (5.7-6.1 GiB, docs/memory-safety.md section 8); a 245k session needs about 4 GiB (14,208 B/token + ~4 nodes), so
behaviour at 245k is unchanged.

- deploy/rust-runtime/profiles/rtx5090-32g.json: memory.prefix_cache_mib "6144".
- leleka-memory: plan::explicit_prefix_budget (the explicit wish clamped to the host, never above the wish); tests that
  an explicit cap does not grow with +37 GiB available while auto does (startup plan and open-time budget).
- leleka-runtime memory_governor: the explicit arm uses it, and the engine now logs "prefix cache budget: N MiB (...)" for
  auto, explicit and off.
- leleka-deploy: MemoryBudget::prefix_cache_cap_mib and a test that every memfd profile carries an explicit cap.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 12:06:18 +01:00
..