One engine start, and the big memory blocks are gone: Christopher Owen's Spark finding on 4 KiB and 64 KiB kernels
On November 22, 2026, Christopher Owen posted a finding about the DGX Spark (his post): start his engine once on a freshly booted 64 KiB-page kernel, stop it, and 112 GiB of the machine's contiguous memory is gone. Not used, gone. The memory is still free, it just cannot form large blocks any more, and his probe reads it 5 to 9% slower than fresh memory. He traced it to a few megabytes of kernel page tables that the IOMMU leaves behind, found that drop_caches and compaction do not undo it, and shipped a fix in spark-ds41f 1122 the same day (promoted to main, not yet tagged). We run his engine on four Sparks on the stock 4 KiB kernel, so the obvious question was whether this touches us at all. We rebooted the pod, booted both kernels in turn, and ran his probe and our decode bench through four engine starts on each. Short answer: the block arithmetic is different on 4 KiB, and the read-speed loss is the same.
In plain English
- The problem (Owen's finding). After one engine start, a Spark's memory is still free but chopped into pieces, and the GPU reads chopped-up memory slower than memory it gets in whole blocks.
- We reproduced it on the 64 KiB kernel. Kernel page tables for the GPU grew from 4.8 to 24.5 MiB and stayed; whole 512 MiB blocks fell from 234 to 29; Owen's memory-read probe fell from 255.7 to 243.4 GB/s after one start.
- New: the 4 KiB kernel loses read speed just as much. 254.4 to 241.3 GB/s after one start, and 232.3 GB/s on our serving nodes after 16 days of restarts, even though its block counts look fine.
- What the engine feels. Eight streams at once decode about 1 to 3% slower after four restarts. The single-stream cost is too small to separate from the engine's own warm-up drift.
- Owen's fix (release 1122). It placed the weights on whole blocks and ran the fastest first start of the night (+1.6% eight-stream over 1120), but on our pod, without his memory-saver module, later starts still slid: after the first start there were too few whole 512 MiB blocks left, and its loader fell back to 128 MiB placement.
- Bottom line: reboot before you benchmark or before a long serving run, and measure with Owen's probe, not with block counts.
What Owen found
Christopher Owen's numbers, from his post and the spark-ds41f repository, are his and are quoted as his. A DGX Spark on the 64 KiB kernel, just rebooted, has 233 free blocks of 512 MiB, which is 116.5 GiB. Start spark-ds41f-1120 once and stop it: 8 blocks are left. The memory is free; it simply cannot form 512 MiB blocks. drop_caches and compaction do not bring the blocks back. A reboot does.
His explanation: PyTorch's expandable-segments allocator maps GPU memory 2 MiB at a time, about 58,000 mappings for 114 GiB of weights and cache. On the Spark the GPU sits behind an IOMMU, so every mapping needs kernel page-table pages, and the kernel keeps those pages after the mapping goes away. SecPageTables in /proc/meminfo (the kernel's counter for secondary page tables, which on arm64 includes IOMMU allocations) read 4.8 MiB after a reboot and 28.5 MiB after one start, and stayed there after the process exited. Those pages cannot be moved, and they landed in 225 of his 233 blocks. On a 64 KiB kernel a block is 512 MiB, so one stuck page spoils the whole thing. In his words: about 24 MiB of page tables, 112 GiB of contiguous memory.
The cost he measured: whole 512 MiB blocks read at 263 GB/s, fragmented memory at 239 to 250 GB/s. (His doctor code says a freshly booted GB10 reads 249 to 254 with the probe we used.) On three Sparks, the second engine start after a reboot was 1.0 to 1.5% slower per decode shape and 1.21% slower across his grid; eight streams went from 172.8 to 170.7 tok/s, inside its own interval. He says he cannot yet explain why whole blocks read faster. His fix, promoted to main as spark-ds41f-1122 on November 22 (not yet tagged when we tested commit 945d95d0), does three things: one allocation for the weights instead of about 58,000 (SecPageTables about 7 MiB after a start), a throwaway "sponge" allocation first so the weights land on whole blocks, and a reset on stop and start that turns spoiled blocks back into movable ones. His result: three starts after a reboot, step time within 0.3%, about 190 of 233 blocks still whole, greedy outputs 128 of 128 identical. He also tried registering 512 MiB huge pages with CUDA directly, got 164 GB/s instead of 241, and abandoned it. Note that his 64 KiB profiles also use his memory saver, a patched nvidia-uvm kernel module, and a kernel memory-policy service.
What we tested
Four DGX Sparks (GB10, 128 GB unified memory each; Sparks 5 to 8 of our cluster) on one switch, tensor parallel 4, serving DeepSeek-V4.1-Flash-1017 with DeepSeek's own weights. The engine is Owen's spark-ds41f-1120 "tp4-switched" profile as shipped (32 seats, 16.5 GiB KV), the lane we published two days ago, plus spark-ds41f-1122 tp4-switched as shipped for the fix. Our only site changes are the node map, port and name, and NCCL merge and cross-NIC off.
Both kernels are the same release: 7.0.0-1025-nvidia with 4 KiB pages and 7.0.0-1025-nvidia-64k with 64 KiB pages, same NVIDIA driver 580.178.04. Page size is the only kernel difference. We did not install the memory saver (it needs a signed kernel module we have not enrolled). On 64 KiB we applied Owen's kernel memory policy at runtime: transparent huge pages off, vm.min_free_kbytes 45166.
| arm | kernel | engine | what happened |
|---|---|---|---|
| A0 (aged) | 4 KiB | 1120 | our serving nodes as found, 16.5 days up, many restarts |
| B | 64 KiB, fresh boot | 1120 | four starts |
| C | 4 KiB, fresh boot | 1120 | four starts |
| D | 64 KiB, fresh boot | 1122 (Owen's fix) | four starts |
| E (control) | 4 KiB, fresh boot | 1120 | one start, the same bench four times with no restart, GPU temperature and clock logged |
Each start follows the same script: snapshot the memory counters while serving, run the decode bench, stop the engine, drop caches and compact, snapshot again idle, then run Owen's probe. After start 3 in B, C and D, and on the aged nodes, we also ran the reset trick. Two instruments appear throughout and we always say which one a number came from: Owen's memory-read probe (STREAM_RATE_PROBE in his spark_ds41f/doctor.py, copied verbatim, two runs per node, reported in GB/s) and our decode bench (greedy, thinking off, fixed 384 tokens per reply, 8 fixed prompts; single-stream is 3 passes over the 8 prompts, eight-stream is 4 reps of all 8 at once, aggregate tok/s). Every number below is the mean of the four nodes unless a range is given.
Across 18 bench runs over 15 engine starts, all 8 prompts gave byte-identical output in every run. So the speculative-decode drafts and their acceptance were identical everywhere; only step time could move. That is what makes the small percentages below readable at all.
vm.min_free_kbytes = 6,548,096 kB, about 6.2 GiB, against 45,443 kB on the 4 KiB kernel. The engine then refused to start: "Free memory on device cuda:0 (102.45/125.29 GiB) on startup is less than desired GPU memory utilization (0.82, 102.73 GiB)". The reserve comes from transparent huge pages: on 64 KiB a huge page is 512 MiB, and the kernel sizes its reserve for those. Turning huge pages off alone brought it back to 45,793 kB. Owen's kernel memory service turns them off and sets the value; with it applied at runtime (45166), every 64 KiB start worked. If you try the 64 KiB kernel without his policy, this is the first wall you hit.Page tables: what the kernel keeps
SecPageTables from /proc/meminfo, in MiB, mean of four nodes:
| state | 4 KiB, 1120 (C) | 64 KiB, 1120 (B) | 64 KiB, 1122 fix (D) |
|---|---|---|---|
| fresh boot | 5.2 | 4.8 | 4.8 |
| serving, start 1 | 189.8 | 24.5 | 26.5 |
| stopped after start 1 | 9.5 | 24.5 | 16.5 |
| stopped after start 2 / 3 / 4 | 10.9 / 11.6 / 12.1 | 25.6 / 26.1 / 26.2 | 17.5 / 20.4 / 26.5 |
On 64 KiB, Owen's observation reproduces almost to the megabyte: the tables built during a start stay after the stop, his 4.8 → 28.5 MiB is our 4.8 → 24.5 MiB. On 4 KiB the picture is different in two ways. While serving, the tables are about eight times larger (189.8 MiB), because a 4 KiB table page maps only 2 MiB and the same 2 MiB-at-a-time mapping needs many more of them. But most of them are freed at stop. Only a few MiB stay per start, and they pile up: 5.2 → 12.1 MiB over four starts, and 28.6 MiB on our aged nodes after 16 days (209.6 MiB while serving). Owen's fix did not lower SecPageTables on our pod: 26.5 MiB serving after start 1 against his roughly 7 MiB. The likely reason is that we ran without the memory saver; we did not test that.
Big blocks: what the counters say
The kernel's buddy allocator hands out free memory in power-of-two blocks, and the largest block it tracks depends on page size: 32 MiB on the 4 KiB kernel, 512 MiB on the 64 KiB kernel. This table is the share of idle free memory (after stop, drop caches and compaction) that still sits in that largest block.
| state | 4 KiB, 1120 (C) · 32 MiB blocks | 64 KiB, 1120 (B) · 512 MiB blocks | 64 KiB, 1122 fix (D) · 512 MiB blocks |
|---|---|---|---|
| fresh boot | 99.6% | 97.6% | 98.7% |
| after start 1 | 82.9% | 12.0% | 39.4% |
| after start 2 | 74.7% | 7.4% | 29.3% |
| after start 3 | 68.5% | 6.0% | 23.1% |
| after start 4 | 65.2% | 6.4% | 12.0% |
Figure 2. Share of idle free memory in the kernel's largest block, mean of four Sparks, after stop + drop caches + compaction. The 4 KiB series counts 32 MiB blocks; the 64 KiB series count 512 MiB blocks. Values from the table above.
In gigabytes, the 64 KiB 1120 column is 117.0 GiB in 512 MiB blocks at fresh boot and 14.5 GiB after one start, which is 234 blocks → 29 blocks (Owen saw 233 → 8). After four starts, 7.75 GiB, or 15.5 blocks. With Owen's fix, 116.9 → 47.75 GiB after one start, about 95 blocks, and 14.5 GiB (29 blocks) after four. Owen reports about 190 of 233 blocks still whole after three starts with the fix; we had 28.0 GiB, 56 blocks, after three.
The kernel also tags each pageblock (its bookkeeping unit for migration: 2 MiB on 4 KiB, 512 MiB on 64 KiB) as Movable or Unmovable, and compaction only works on movable ones. On 4 KiB, 1,564 of 64,512 pageblocks were Unmovable at fresh boot and 50,796 after one start, 79%. On 64 KiB, 10 of 252 fresh and 204 after one start, 81%. On the aged 4 KiB nodes, 53,269 of 64,512, 83%. The same share of memory gets tagged on both kernels; the 64 KiB kernel just tags it in 512 MiB pieces. Our aged 4 KiB nodes had only 25.9% of their idle free memory left in 32 MiB blocks. Drop caches and compaction ran before every idle snapshot and did not restore blocks on either kernel, which is Owen's claim, and it holds here too.
Memory read speed: Owen's probe
Owen's probe allocates a buffer with a plain PyTorch allocation in a new process and times how fast the GPU reads it, in GB/s. It measures what an ordinary, unprotected allocation gets on the machine as it stands. Idle nodes, after stop + drop caches + compaction, mean of four nodes and two runs each:
| state | 4 KiB, 1120 (C) | 64 KiB, 1120 (B) | 64 KiB, 1122 fix (D) |
|---|---|---|---|
| fresh boot | 254.4 | 255.7 | 252.3 |
| after start 1 | 241.3 | 243.4 | 243.4 |
| after start 2 | 236.3 | 238.4 | 239.1 |
| after start 3 | 234.8 | 237.5 | 237.4 |
| after start 4 | 234.8 | 236.4 | 234.9 |
| aged 4 KiB nodes, 16.5 days | 232.3 | — | — |
Figure 3. Owen's memory-read probe on idle nodes by state, GB/s, mean of four Sparks and two runs each. Dashed line: our aged 4 KiB serving nodes after 16.5 days, 232.3 GB/s.
After one start the probe is down 5.1% on 4 KiB, 4.8% on 64 KiB 1120 and 3.5% on 64 KiB 1122. After four starts: 7.7%, 7.5% and 6.9%. The aged 4 KiB nodes read 8.7% below a fresh 4 KiB boot. The control arm repeated it on a second fresh 4 KiB boot: 252.5 GB/s fresh, 241.1 after one start.
This is the result we did not expect. The 4 KiB kernel loses read speed by about the same amount as the 64 KiB kernel, even though 65 to 83% of its free memory is still sitting in 32 MiB blocks. Whatever the GPU gains from fresh memory is bigger than a 32 MiB block. It is also not heat: in the control arm we re-ran the probe four times over ten minutes on the idle nodes as they cooled from 46 to 42–43 °C (a fresh boot measured 45 °C), and they still averaged 240.0 GB/s (232.9 to 242.7). The loss is memory state.
It matters for how you check a Spark. Owen's doctor warns when under 50% of idle free memory is in the largest block. On our 4 KiB nodes that warning would never fire (65 to 83%) while the probe read 235 to 241. His doctor --live --stream-rate probe does catch it: it warns below 245 GB/s (STREAM_RATE_MIN_GBS = 245.0 in his doctor.py), and every post-start four-node mean of ours, in every arm, 4 KiB included, was below that. The highest was 243.4; the highest single reading 245.3.
Does the engine notice?
Our decode bench, single-stream mean of 3 passes / eight-stream aggregate mean of 4 reps, tok/s:
| start | 4 KiB, 1120 (C) | 64 KiB, 1120 (B) | 64 KiB, 1122 (D) |
|---|---|---|---|
| 1 | 103.5 / 207.3 | 102.0 / 207.6 | 104.9 / 210.9 |
| 2 | 101.3 / 207.2 | 101.2 / 206.5 | 102.1 / 207.3 |
| 3 | 100.9 / 206.0 | 101.0 / 205.3 | 101.4 / 206.1 |
| 4 | 101.1 / 205.6 | 100.1 / 203.6 | 101.2 / 205.1 |
Figure 4. Left: eight-stream aggregate tok/s by engine start for the three arms, with control E (one start, the same bench four times, no restart) plotted at reps 1 to 4. Right: single-stream tok/s pass by pass inside one bench for control E rep 1 and rep 4, showing the warm-up drift that exists with no restart and no memory change.
Eight-stream throughput at start 4 against start 1: −0.8% on 4 KiB, −1.9% on 64 KiB 1120, −2.8% on 64 KiB 1122. It fell with every restart in all three arms. The control arm says that is not the bench drifting on its own: one start, the same bench four times with no restart, gave eight-stream 207.4 / 208.6 / 207.7 / 209.1, up 0.8% from rep 1 to rep 4, not down.
Single-stream is confounded, and we want to be plain about that. Within every bench the first pass over the 8 prompts runs about 3% faster than passes 2 and 3, and it does so in the control arm with no restart and no memory change (rep 1 passes: 103.75 / 100.18 / 100.65 tok/s). The SM clock held at about 2,190 MHz throughout the control arm while GPU temperature rose from 46 to 64 °C, so whatever causes it, it is not clock throttling; we have not pinned down the cause. Start-to-start single-stream deltas of −2.3% (4 KiB), −1.9% (64 KiB 1120) and −3.5% (1122) at start 4 are therefore mostly that drift and cannot be pinned on memory. Control E's single-stream means were 101.5 / 101.0 / 100.9 / 101.1 across its four reps. The fairest single-stream comparison is pass 1 only (the first 8 prompts of each bench, the coolest), start 2 against start 1: −0.75% on 4 KiB, −0.83% on 64 KiB 1120, −0.58% on 1122. Owen measured 1.0 to 1.5%. Same direction, same size, but inside our warm-up noise.
The aged 4 KiB lane, 16.5 days up and serving continuously, benched 98.5 / 202.7, which is −4.9% / −2.2% against the fresh 4 KiB start 1. Those nodes were warm and long-serving, so it is not a clean comparison, but it is the direction you would expect. Bottom line for the engine: eight-stream throughput drops about 0.3 to 0.9% per restart on both page sizes, and the single-stream cost is below what our bench can resolve. Owen's −1.21% sits in the same band.
Owen's fix on our pod
spark-ds41f-1122 on the 64 KiB kernel, no memory saver. The fix engaged on every start, but not the same way each time. On start 1 the engine log shows all three parts working: "Pre-allocated 86.0 GiB single contiguous CUDA pool … order-13 free was 111.0 GiB", then "Resized contiguous CUDA pool 86.0 -> 74.0 GiB for 70.3 GiB weights", then "Buddy hugepage sponge soaked 9216.0 MiB (72 chunks) … so 73569.4 MiB of weights draw >= 512.0 MiB contiguous physical blocks". The sponge is the throwaway allocation that soaks up the already-spoiled pieces so the weights land on whole blocks. On starts 2 and 3 there were not enough whole 512 MiB blocks left ("order-13 free was 47.5 GiB", then 38.0 GiB), so the loader stepped down: the sponge soaked 26,240 and 30,720 MiB and the weights drew ">= 128.0 MiB contiguous physical blocks" instead of 512 MiB. On start 4, after the reset, the log shows no contiguous-pool line at all, and the weights again drew 128 MiB blocks. So on our pod the fix delivered its full placement once, on the first start after a reboot, and a smaller one after that.
What it bought us: three to four times more whole 512 MiB blocks than 1120 after starts 1 to 3 (39.4 / 29.3 / 23.1% against 12.0 / 7.4 / 6.0%), converging by start 4 (12.0% against 6.4%). Start 1 on 1122 was the fastest run of the night: 104.9 tok/s single-stream (+2.8% against 1120's start 1) and 210.9 eight-stream (+1.6%). By start 4 the margin was +1.2% / +0.75%.
What it did not do here: hold the starts flat, which fits the stepped-down placement above. Eight-stream fell 2.8% over four starts, where Owen reports step time within 0.3% over three on his memory-saver profile. And SecPageTables was not reduced (26.5 MiB serving, see the page-table table). The probe does not see the fix at all, which is expected: the probe allocates like an ordinary process, without the sponge, so it measures what everything other than the 1122 engine gets. Untested: 1122 with the memory saver, and 1122 on the 4 KiB kernel. Those two are the obvious next runs.
The reset trick
Owen's reset turns spoiled blocks back into movable ones by grabbing whole 512 MiB huge pages and releasing them, which lets the kernel re-tag the pageblocks. We ran his exact logic on 64 KiB and an adaptation with 2 MiB huge pages on 4 KiB, after start 3 in each arm and on the aged nodes.
- 4 KiB (2 MiB huge pages, our adaptation). It flipped Unmovable pageblocks back to Movable: 53,269 → 6,363 on the aged nodes, 50,984 → 3,831 in arm C. The probe did not move (aged 232.3 → 231.6; C 234.8 → 234.8) and the share in 32 MiB blocks did not move (68.5 → 69.2%). After the next start the pageblocks were Unmovable again (C after start 4: 51,337).
- 64 KiB, 1120 (Owen's 512 MiB reset, his logic). It can only claim blocks that are already whole, 14 to 16 per node at that point, and it changed nothing: 216 → 216 Unmovable, probe 237.5 → 237.4.
- 64 KiB, 1122. With 51 to 60 whole blocks per node to claim, Unmovable went 232 → 177; probe 237.4 → 237.8, no change.
Our reading: the reset fixes the bookkeeping tag, not the stuck pages. It helps the next start's placement only if there are whole blocks left to protect, which is why, on 64 KiB, it does something after a 1122 start and nothing after a 1120 one.
Why it happens
Figure 1. The mechanism on the 64 KiB kernel, schematic. Lots are 512 MiB blocks; counts and page-table sizes are our four-node means (fresh boot and after one start of 1120); the mapping count is Owen's.
Owen's analogy is the right one. Think of a Spark's memory as a street of empty parking lots. A whole lot is worth more than the same area in scattered spaces, because the GPU can treat it as one thing. When the engine starts, it does not take the lots whole; it maps the GPU's memory 2 MiB at a time, tens of thousands of times. Every one of those mappings needs the IOMMU, the unit that translates the GPU's addresses into physical ones, to have a page-table entry, and page-table entries live in small kernel pages. The kernel drops one into whatever lot is handy. When the engine stops, the cars leave, but the kernel keeps the page-table pages for reuse, and the kernel cannot tow them: page-table pages are not movable, so compaction, which works by moving movable pages together, skips right over them. Every lot with one parked page-table page is still almost entirely empty and still cannot be sold as a whole lot.
On the 64 KiB kernel, a lot is 512 MiB and a page-table page is tiny next to it, so about 24 MiB of stuck pages, spread around, spoiled 112 GiB in Owen's count and 102 GiB in ours (117.0 → 14.5 GiB). That is the headline arithmetic and it is correct. On the 4 KiB kernel the lot the counters report on is 32 MiB and the migration unit is 2 MiB, so the same scattering leaves most of the 32 MiB counts intact, and the buddyinfo numbers look healthy. Yet the probe falls by the same 5%. Our best guess, which we have not verified, is that what the GPU actually benefits from is physical contiguity over ranges much larger than 32 MiB: the GPU's own address translation can use larger mappings over large contiguous physical ranges, which cuts translation misses on a read that is already bandwidth-bound. If that is right, the 32 MiB block count is the wrong instrument on 4 KiB, and the probe is the right one on both kernels. Owen says he cannot yet explain the read-speed difference; neither can we, beyond that guess.
What this means if you run Sparks
- 4 KiB does not dodge it. The block arithmetic differs, but fresh-memory read speed fell about as much on 4 KiB as on 64 KiB.
- drop_caches and compact_memory do not undo it. A reboot does. Every fresh boot, both kernels, averaged 252 to 256 GB/s.
- Measure, do not infer. The buddyinfo share can look healthy on 4 KiB while reads are 7 to 8% down. Owen's
bin/spark doctor --live --stream-rateprobe is the right instrument. - The engine cost is small but real. 0.3 to 0.9% eight-stream per restart here; single-stream unresolved. A benchmark comparison should start every arm from a fresh boot, or alternate arms, or the second arm carries a handicap it did not earn.
- Aged nodes had the worst reads. 232 GB/s after 16 days of restarts. If you swap models often, a reboot before a long serving stint is cheap insurance.
What we did not test, and caveats
- One pod, one run per start, four starts per arm. Eight-stream reps vary about 0.4 to 1.4% (standard deviation), so the per-restart cost is a trend across four points, not a single clean delta.
- No memory saver. Owen's kernel memory policy was applied at runtime, not through his service.
- Single-stream speed has a roughly 3% warm-up drift unrelated to restarts (control E). Treat every single-stream delta in this post accordingly.
- 1122 got one unmeasured priming start (cold kernel compile), then a fresh reboot before arm D.
- Not tested: 4 KiB with 1122; the memory saver; long-run serving under load for hours after N restarts; and why fresh memory reads faster, which is open, as Owen says. The translation-miss explanation above is plausible and unverified.
How to check your own Spark
Tested on our nodes on November 22, 2026. The first four lines need nothing installed; the last needs Owen's repository checked out and the GPU idle.
uname -r; getconf PAGESIZE
grep SecPageTables /proc/meminfo
cat /proc/buddyinfo # last column = free blocks of the largest size
sudo cat /proc/pagetypeinfo | sed -n '/Number of blocks/,$p' # Unmovable vs Movable pageblocks
# with spark-ds41f checked out, GPU idle:
bin/spark doctor --live --stream-rate # Owen's memory-read probe; fresh GB10 reads ~249-256 GB/s
If SecPageTables is tens of MiB on an idle machine, or the probe reads under 245 GB/s, you are looking at this.
Credits and links
Christopher Owen: the finding, the mechanism, the engine, the probe and the fix (his post; spark-ds41f at main 945d95d0; dgx-spark-memory-saver). His published numbers are his and are labelled as his throughout. The Linux proc filesystem documentation defines SecPageTables ("Memory consumed by secondary page tables, this currently includes KVM mmu and IOMMU allocations on x86 and arm64"). DeepSeek: the model. Our method for comparing the two kernels is the one from testing DGX Spark kernels; the lane under test is the one from spark-ds41f-1120 on four Sparks.