Skip to content

docs(adr): memory + eviction decisions 0006-0008 (closes #41, #45, #46)#171

Merged
ELares merged 2 commits into
mainfrom
feat/m0-memory-eviction-adrs
Jun 13, 2026
Merged

docs(adr): memory + eviction decisions 0006-0008 (closes #41, #45, #46)#171
ELares merged 2 commits into
mainfrom
feat/m0-memory-eviction-adrs

Conversation

@ELares

@ELares ELares commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Three evidence-grounded decisions on the bytes-per-key / throughput-per-core core.

What

Review focus (engineering)

Closes #41. Closes #45. Closes #46. Part of M0: Vision and Scope.

ELares added 2 commits June 13, 2026 11:42
ADR-0006 default allocator (#41): tikv-jemallocator/jemalloc for mallctl
introspection, the je_get_defrag_hint path, and tuned dirty-page decay;
per-shard mallctl accounting makes maxmemory honest (invariant 3); mimalloc
rejected as default for lacking introspection/defrag-hint.
ADR-0007 cache mode by default (#45): host-derived ceiling + eviction ON;
strict no-evict is an explicit opt-in, inverting Redis's maxmemory 0 /
noeviction footgun.
ADR-0008 default eviction policy (#46): S3-FIFO behind a pluggable
EvictionPolicy trait; SIEVE and W-TinyLFU-fronted kept selectable; LRU
rejected (per-hit relink). INDEX/OPEN/QUESTIONS updated; #42/#47 to be
re-milestoned to M1 as empirical validation.

Closes #41
Closes #45
Closes #46

Signed-off-by: Zeke <ezequiel.lares@outlook.com>
ADR-0006: correct the accounting model (jemalloc stats.allocated is
logical used_memory, NOT RSS; invariant 3 means logical allocated bytes;
RSS can exceed it, decay/defrag keep them close); record #41's commitments
to enable the jemalloc background purger and lower dirty_decay_ms for
eviction churn; narrow the mimalloc rejection to the decisive
je_get_defrag_hint gap (mimalloc can report RSS via mi_process_info).
ADR-0007: replace the strawman rejected option with issue #45's real
Option C (ceiling-on + noeviction default). ADR-0008: cite SIEVE's own
>45%-of-traces result and the ~8B/entry W-TinyLFU sketch vs S3-FIFO's
2-bit counter; flag both win-rates as home-corpus, gated on #47; add the
sampled-LRU/LFU rejection.

refs #41, refs #45, refs #46

Signed-off-by: Zeke <ezequiel.lares@outlook.com>
@ELares ELares merged commit 809b434 into main Jun 13, 2026
1 check passed
@ELares ELares deleted the feat/m0-memory-eviction-adrs branch June 13, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant