ci(dgx): proven GB10 unified-memory safety harness (RMM cap + watchdog + preflight)#1671
Merged
Conversation
…g + preflight)
We OOM-thrashed the shared dgx-spark box for ~9.5h with a 1.8B-edge cudf/cugraph
load: on the GB10, GPU memory IS system RAM (unified, 119GB, 16GB swap), so a
cudf/cugraph over-allocation consumes host RAM and OOM-kills the OS.
Proven on dgx (small safe scale, host flat throughout):
- docker --memory is TRANSPARENT to cudf/unified allocs (reached 8GB under a 4GB
cap) -> useless as a cap.
- RMM LimitingResourceAdaptor caps BOTH cudf AND cugraph cleanly (caught
MemoryError, host untouched) -> the real containment.
- a host watchdog kills a runaway host (pandas/numpy) alloc at a RAM floor.
benchmarks/dgx/:
- sitecustomize.py: auto-applies GFQL_RMM_LIMIT_GB to any Python in the container
(non-invasive; no workload edits).
- preflight.py + test_preflight.py: peak_gb()/is_safe() refuse over-budget runs;
test guards that friendster-1.8B is REFUSED and the 80M handoff run allowed.
- safe_run.sh: wraps docker run with preflight-refuse + RMM inject + watchdog
force-kill + hard timeout. ALL dgx GPU/big runs must go through it.
- README.md: usage + rationale.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The LOCAL box is a ~31GB workstation, not dgx's 119GB — a runaway OOM logs the user out (happened 2026-07-01 with a 5M/20M local bench). local_run.sh caps address space (ulimit -v, default 8GB) so a runaway dies with a clean MemoryError instead of the desktop session. Tested: 2GB cap + 3GB alloc -> MemoryError, desktop survived. Benchmarks still go to dgx via safe_run.sh; this guards the tiny local work that remains. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
We OOM-thrashed the shared dgx-spark box for ~9.5 h with a 1.8B-edge cudf/cugraph load. Root cause: the GB10 is unified memory — GPU memory is the 119 GB system RAM (16 GB swap). A cudf/cugraph over-allocation consumes host RAM and OOM-kills the OS's own services; the container then hangs and the box wedges.
What (proven on dgx, small safe scale, host flat throughout)
docker --memoryis TRANSPARENT to cudf/unified allocations (reached 8 GB under a 4 GB cap) → useless as a guardrail.LimitingResourceAdaptorcaps both cudf AND cugraph cleanly — the exact crash call (compute_cugraph('pagerank')) hit the limit and raised a caughtMemoryError, host untouched. This is the real containment.Files (
benchmarks/dgx/)sitecustomize.py— auto-appliesGFQL_RMM_LIMIT_GBto any Python in the container (non-invasive, no workload edits).preflight.py+test_preflight.py—peak_gb()/is_safe(); the test guards that friendster-1.8B is REFUSED and the 80M handoff run allowed.safe_run.sh— wrapsdocker runwith preflight-refuse + RMM inject + watchdog force-kill + hard timeout. All dgx GPU/big runs go through it.README.md— usage + rationale.Standalone infra off
master; benefits every branch that runs dgx benchmarks.🤖 Generated with Claude Code