Where Did All My Memory Go? Tuning Valkey Memory Usage at Scale
summary
An open source encoding analyzer scans every key (supports cluster discovery and partial prefixes), reports field-size distributions (example: 11,500 hashes; 70% of fields <11 chars; 90% <91 chars; largest ~500 chars) and shows encoding outcomes so operators change limits safely. Raising maxleaf 64→128 in one experiment drops hash-table keys from 43%→32% (about a 10% absolute drop), reduces memory from ~100 GB across 5 nodes to ~59 GB across 3 nodes, and emits terminal Markdown plus JSON for dashboards.
AI-written summary · about
