Reclaiming 4.1 GiB of hidden memory on NVIDIA DGX Spark
Marcin Junczys-Dowmunt published a hands-on tutorial showing that although the NVIDIA DGX Spark advertises 128GB of unified memory, Linux leaves 4.1 GiB of it unexposed by default. Using two stackable tricks he recovered the full hidden memory, growing the KV pool from 262k to 938k tokens (3.6x) in benchmarks, and open-sourced a minimal repo, emjotde/spark-ram-reclaim, for reproduction.
Confirmed
- Under the default 4 KiB kernel, vmemmap page metadata is a major source of memory loss
- Installing NVIDIA's official 64 KiB kernel cuts vmemmap metadata overhead 16x versus 4 KiB pages, recovering about 2.098 GiB, and can coexist with the original 4 KiB kernel
- On a headless DGX Spark, 2046 MiB of display reservation can be reclaimed as ordinary memory
- Combined, the tricks recover 4.096 GiB; measured KV pool grew from 262k to 938k tokens
- The GitHub repo emjotde/spark-ram-reclaim contains both verified operations plus a runbook
Why it matters
- Nearly 3.2% of the unified memory is silently consumed, directly limiting KV cache capacity for LLM inference; two steps expand servable context 3.6x at minimal cost
- The fully documented tutorial and open-source scripts lower the barrier for ordinary users to reproduce
2026-10-02 ~ 2026-10-02 · 7 related posts
Primary sources
- Recovering 4.1 GiB of hidden RAM on NVIDIA DGX Spark, 3.6x bigger KV pool — marian_nmt · 2026-10-02
- [source] Recovering 4.1 GiB of RAM on NVIDIA DGX Spark: KV pool jumps from 262k to 938k tokens — marian_nmt · 2026-10-02
- spark-ram-reclaim: open-source scripts recover 4.1 GiB of RAM on NVIDIA DGX Spark — marian_nmt · 2026-10-02
4 near-duplicate retellings: marian_nmt · marian_nmt · marian_nmt · marian_nmt