You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GB10 unified memory: KV budget and cuCtxCreate respond to page-cache-polluted MemFree, not MemAvailable — same core+reserve gives 2.08M vs 3.43M KV tokens and spurious CUDA_ERROR_OUT_OF_MEMORY #630
area:memoryMemory budgets, allocation lifetimes, scratch sharing, and capacity.bugSomething isn't workingperformancePerformance, latency, throughput, or memory-efficiency investigation or improvement.priority:P2Normal bug priority: workflow failure or diagnosis with narrower impact or an available workaround.triage:investigateNeeds reproduction, diagnosis, or a fix; no complete verified resolution is established.
Observed — identical core, identical flags, different page-cache state at plan time
memory state at plan
cache budget
KV pages
KV tokens
source log
page cache full (distribution re-hash filled it)
13.75 GiB
8,129
2,081,024
orbit run
page cache full (second polluted run)
14.44 GiB
8,548
2,188,288
orbit run
page cache cleared first (MemFree ~114 GiB)
22.20 GiB
13,389
3,427,584
manual run
MemAvailable reads ~116 GiB in every one of those states; only MemFree differs (0.8–1.4 GiB vs 114 GiB). On GB10 the page cache competes with CUDA allocations, and two distinct failures follow:
Hard failure — cuCtxCreate_v2 failed (2, CUDA_ERROR_OUT_OF_MEMORY) during Initialize GPU, reproduced twice with MemFree 0.8–1.5 GiB while MemAvailable still reported ≈116 GiB:
[rank 0 neuron] [ FAILED ] Initialize GPU. 0.2s
[rank 0 neuron] Error: cuCtxCreate_v2 failed (2, CUDA_ERROR_OUT_OF_MEMORY): out of memory
Silent degradation — even when startup succeeds, the KV pool is planned 37 % smaller (limited by memory) with no hint that the "missing" memory is reclaimable page cache created by flare's own reads minutes earlier.
No-root workaround that restores correct behavior
Allocate + touch anonymous memory to force eviction, release, then launch (MemFree 6.6 → 64.8 GiB / 4.4 → 64.7 GiB, Cached 110 → 52 GiB). With that baseline, plans land at the 22.2 GiB / 3.43 M-token figure consistently. (sync; echo 3 > /proc/sys/vm/drop_caches does the same but needs root; anonymous-touch works without.)
Asks
Before planning the KV pool on unified-memory parts, either reap reclaimable page cache or size the budget from physically-free pages (MemFree-like), not MemAvailable-style accounting.
If the plan lands well below what a clean baseline would give, log a one-line warning that reclaimable page cache is limiting the KV budget.
On the cuCtxCreate failure path, print MemFree/MemAvailable/Cached so the root cause is visible — both reproductions looked like a genuine OOM with 116 GiB "available", which cost us two dead runs.
Related
#73 documents the export-time cousin of this (vm.min_free_kbytes watermarks hide ~6.6 GB from the headroom check); this is the serving-time cousin (reclaimable page cache pinning MemFree). Same island: GB10 free-memory accounting.
orbit run (plans immediately after distributing ~95 GiB of rank-1 weights over CX7, which reads them into page cache on the controller)
MemFree depressed by distribution reads
13.3 GiB · 2,005,760 KV tokens (both ranks)
manual flare run after echo 3 > drop_caches-style eviction
MemFree ~110 GiB
22.2 GiB · 3,427,584 KV tokens
i.e. the KV pool silently loses ~41% of its tokens purely because of page cache pinned by a read burst that finished seconds earlier — and 2,005,760 sat just above our 2M-token operating floor, so the same plan can land unacceptably low. MemAvailable still reads ~115 GiB at plan time; only MemFree predicts the outcome (unified memory, cuCtxCreate_v2 can't use page cache).
The ask from the original report stands: size the KV plan (and the CUDA context budget) from MemFree, or flush reclaimable cache before planning on GB10; either way please print MemFree/MemAvailable/Cached alongside the Allocate cache line, and consider warning when the two diverge by >10 GiB.
Still open on v0.5.1 (1fbcc3c9, #667) — first GB10 re-measurement of the page-cache release described there ("not yet re-measured on GB10 hardware").
Same pair, same day, same core/flags, nothing else running; only difference is who launches:
launch
memory state at plan time
Allocate cache
orbit run (plans immediately after distributing ~84 GiB of rank-1 weights over CX7, which saturates page cache on both ends — reads on the controller, fabric writes on the peer)
controller MemFree depressed by distribution reads
−37.8% of the KV pool, and 1,961,984 is below our 2,000,000-token operating floor (the previous e85019b9 data point, 2,005,760 on the older core, scraped past it). The arithmetic is clean: the two plans differ by 7.5 GiB of budget, and at this core's fixed 153,837 tokens/GiB that is exactly the 1.19M-token delta — i.e. the sizing path is unchanged, it still trusts a memory figure that distribution's own residency depresses.
A detail from the per-rank Plan cache lines that may help localize it: rank 0 (controller) budgeted 13.00 GiB while rank 1 (peer) budgeted 14.42 GiB; the group takes the min, so the polluted controller is the binding constraint. After the group was fully loaded and idle: controller MemFree 1.0 / MemAvailable 11.2 / Cached 10.6 GiB vs peer MemFree 11.9 / MemAvailable 13.2 / Cached 1.6 GiB — ~9 GiB of distribution-related page cache still resident on the controller at idle, consistent with the 7.5 GiB budget shortfall. None of the release calls added by #667 (sha256_file, serve_source ranges, store_parallel/store_partial, agent::fetch, post-load_payload) visibly cleared it by plan time on this path.
For completeness, eviction quality on the manual side also shifts the plan: with Cached 8.2 GiB still resident (an aggressive MemFree-targeted evictor declared victory) the manual launch planned 3,153,664; the same core with Cached 1.4 GiB planned 3,252,736. MemFree alone can over-report cleanliness when reclaimable cache is left in place.
The ask stands: size the KV plan (and CUDA context budget) from MemFree, or flush reclaimable cache before planning; print MemFree/MemAvailable/Cached alongside the Allocate cache line; warn when they diverge by >10 GiB. Happy to run any instrumented pass on this hardware — it is a 5-minute reproduction (orbit run on a 2-node GB10 pair, compare against a manual launch of the same core).
area:memoryMemory budgets, allocation lifetimes, scratch sharing, and capacity.bugSomething isn't workingperformancePerformance, latency, throughput, or memory-efficiency investigation or improvement.priority:P2Normal bug priority: workflow failure or diagnosis with narrower impact or an available workaround.triage:investigateNeeds reproduction, diagnosis, or a fix; no complete verified resolution is established.
Activity
Unify Orbit rank cache, fix GB10 page-cache KV sizing, consolidate NV…
pfn commentedon Dec 1, 2026
Still open on
maine85019b9— #646's GB10 KV-sizing change did not cover this path.Cleanest reproduction yet (same core
gb10-tp2-…0434, samereserve=4G, nothing else running):Allocate cacheorbit run(plans immediately after distributing ~95 GiB of rank-1 weights over CX7, which reads them into page cache on the controller)flare runafterecho 3 > drop_caches-style evictioni.e. the KV pool silently loses ~41% of its tokens purely because of page cache pinned by a read burst that finished seconds earlier — and
2,005,760sat just above our 2M-token operating floor, so the same plan can land unacceptably low. MemAvailable still reads ~115 GiB at plan time; only MemFree predicts the outcome (unified memory,cuCtxCreate_v2can't use page cache).The ask from the original report stands: size the KV plan (and the CUDA context budget) from MemFree, or flush reclaimable cache before planning on GB10; either way please print MemFree/MemAvailable/Cached alongside the
Allocate cacheline, and consider warning when the two diverge by >10 GiB.Harden Orbit payload integrity, multi-deployment TP seams, GB10 page-…
Harden Orbit payload integrity, multi-deployment TP seams, GB10 page-…
pfn commentedon Dec 2, 2026
Still open on
v0.5.1(1fbcc3c9, #667) — first GB10 re-measurement of the page-cache release described there ("not yet re-measured on GB10 hardware").Same pair, same day, same core/flags, nothing else running; only difference is who launches:
Allocate cacheorbit run(plans immediately after distributing ~84 GiB of rank-1 weights over CX7, which saturates page cache on both ends — reads on the controller, fabric writes on the peer)MemFreedepressed by distribution readslimited by memory)flare runafter eviction−37.8% of the KV pool, and
1,961,984is below our 2,000,000-token operating floor (the previouse85019b9data point,2,005,760on the older core, scraped past it). The arithmetic is clean: the two plans differ by 7.5 GiB of budget, and at this core's fixed 153,837 tokens/GiB that is exactly the 1.19M-token delta — i.e. the sizing path is unchanged, it still trusts a memory figure that distribution's own residency depresses.A detail from the per-rank
Plan cachelines that may help localize it: rank 0 (controller) budgeted 13.00 GiB while rank 1 (peer) budgeted 14.42 GiB; the group takes the min, so the polluted controller is the binding constraint. After the group was fully loaded and idle: controllerMemFree 1.0 / MemAvailable 11.2 / Cached 10.6 GiBvs peerMemFree 11.9 / MemAvailable 13.2 / Cached 1.6 GiB— ~9 GiB of distribution-related page cache still resident on the controller at idle, consistent with the 7.5 GiB budget shortfall. None of the release calls added by #667 (sha256_file,serve_sourceranges,store_parallel/store_partial,agent::fetch, post-load_payload) visibly cleared it by plan time on this path.For completeness, eviction quality on the manual side also shifts the plan: with
Cached 8.2 GiBstill resident (an aggressiveMemFree-targeted evictor declared victory) the manual launch planned3,153,664; the same core withCached 1.4 GiBplanned3,252,736.MemFreealone can over-report cleanliness when reclaimable cache is left in place.The ask stands: size the KV plan (and CUDA context budget) from
MemFree, or flush reclaimable cache before planning; printMemFree/MemAvailable/Cachedalongside theAllocate cacheline; warn when they diverge by >10 GiB. Happy to run any instrumented pass on this hardware — it is a 5-minute reproduction (orbit run on a 2-node GB10 pair, compare against a manual launch of the same core).fix(flare-cli,helios): release page cache with O_DIRECT peer serving,…
fix(flare-cli,helios): release page cache with O_DIRECT peer serving,…
fix(flare-cli,helios): release page cache with O_DIRECT peer serving,…