Skip to content

feat(data_plane): SSD offload on by default, with a memory-pressure warning - #5151

Merged
ZhiyuLi-Nvidia merged 13 commits into
zhiyul/feat/nixl-ssd-io-threadsfrom
zhiyul/feat/ssd-offload-default
Nov 20, 2026
Merged

ZhiyuLi-Nvidia merged 13 commits into
zhiyul/feat/nixl-ssd-io-threadsfrom
zhiyul/feat/ssd-offload-default

Conversation

@ZhiyuLi-Nvidia

@ZhiyuLi-Nvidia ZhiyuLi-Nvidia commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Stack: PR 2 of 3, on top of #5150 (nixl.ssd.io_threads), which sits on #5145. Review the last 10 commits only (bc583ffba8 SSD offload on by default, with a memory-pressure warning, 46123e3ca8 default SSD tier directories on the node's NVMe, 84016d5dd9 Mooncake offload metrics every step, one warning per run, d510bda8d1 single-controller recovery tests cover the default SSD tiers, 52a2d7bc30 ray.sub mounts a per-user NVMe dir at /raid; one note when the tiers fall back to /tmp, 99283f943d review follow-ups for the default SSD tiers, a03c296106 reference config follows the 0.8 offload_threshold default, 8c41d9846c ruff format test_local_disk.py, e292d500c4 ruff format two data-plane tests, 5e1224ecb8 review follow-ups for the default SSD tiers (round 2)); the earlier ones are #5150 and #5145.

Review follow-ups round 2 (5e1224ecb8): per-user default folders (<name>-<uid>), nixl resolves a null path in each unit, simple.ssd_offload gets the null-path default, test mocks set data_plane.backend, nixl_ssd functional sizes back to 128 KiB + 128 KiB, docs and comments per the review.

Review follow-ups (99283f943d, was ded40c039): the nixl IO area is pinned beside the slab, so the default-on tier no longer shrinks the put area (a unit holds unit_slab_bytes + staging_bytes); Mooncake offload_threshold default 0.8; ray.sub lists the /raid mount before MOUNTS; grpo_sync logs the backend counters and the one-time warning through the same helper as the single controller (observability.backend_health_metrics). A/B of the tiers on against off with nothing spilled, and the like-for-like pressure numbers, are in the review thread.

What

data_plane.mooncake_cpu.ssd_offload and data_plane.nixl.ssd are on by default, with one warning per run at the first spill. simple.ssd_offload stays off but gets the same path: null default. The nixl IO area (staging_bytes, a quarter of the slab by default) is pinned beside the slab, so the put area keeps its configured size.

Why

Both tiers spill only when memory is full (mooncake: above offload_threshold; nixl: when a unit's put area is full). While memory suffices nothing is written, so the default costs nothing, and a run whose data plane outgrows memory degrades instead of failing. simple.ssd_offload is by value size (every value >= threshold_bytes always goes to SSD), which is a real cost, so it is not defaulted.

The warning and the metrics

The user should know when the workload is under memory pressure and paying for it. Both backends warn once per run, from the single controller, at the first spill, and log their SSD tier every step beside the other data-plane metrics:

  • nixl: data_plane/nixl/ssd_spills_sum, ssd_spilled_mb_sum (from tq_nixl.unit_metrics()); the warning fires when ssd_spills_sum first rises above 0.
  • mooncake: the controller reads the master's /metrics every step (the URL travels in the TQ MooncakeStore config block) and logs data_plane/mooncake/mem_used_mb, mem_capacity_mb, mem_used_ratio, keys, offload_rounds_total, mem_evicted_keys_total, mem_evicted_mb_total, disk_evictions_total; the warning fires when offload_rounds_total first rises above 0. Mooncake 0.3.x has no per-object offload counter: each successful eviction round wrote objects to the owners' SSD (offload_rounds_total), and mem_evicted_* count the memory copies it then dropped, whose reads go through the SSD. Past the threshold with memory to spare it keeps the memory copies (forced-spill test: 112 files, 11 rounds, 0 dropped); under memory pressure it drops them (150 GB recipe: 34,693 dropped). The owners' 30 s sweep is back to only deleting files of cleared keys.

Default path: the node's NVMe

path: null (the default) resolves on the node that creates the directory (local_disk.default_ssd_dir): /raid/<name>-<uid> when /raid is in /proc/mounts, is not RAM-backed and is writable by the process, else /tmp/<name>-<uid> (one folder per user: the first run creates it 0755). nixl resolves it in each storage unit, on the unit's own node; simple on the driver, since TQ creates the folder inside its own actor. An owner still refuses a tmpfs/ramfs result (require_disk_backed). An explicit path must be absolute, as before.

ray.sub puts the NVMe there by itself: it mounts a per-user directory at the container's /raid, NRL_NVME_DIR when set (e.g. /raid/scratch/$USER on a cluster whose RAID root is root-owned) else /raid/$USER, created on every node where its parent is writable (a bare-metal DGX whose user owns /raid, or a site-provided directory). Never the shared RAID root, so users on one node cannot collide. No writable directory: no mount, and the driver logs one note per run saying the tiers use /tmp and what /tmp is (ext4 mounted at / in an enroot container, where /tmp is the NVMe RAID already).

Two facts from the GB300 runs shaped this: os.path.ismount("/raid") is False inside an enroot container (the container root itself lives under /raid), so the check reads /proc/mounts; and a stock /raid is root-owned, so an unwritable /raid falls back to /tmp instead of failing.

real recipe, 2 nodes, forced spills, path: null (folder names from before the -<uid> suffix) result
/raid root-owned, nixl and mooncake resolved to /raid/nrl_*, owners died with PermissionError (before the writability rule)
/raid writable, nixl exit 0, 3 steps, 67 blobs / 25.9 MiB spilled, directory removed at shutdown
/raid writable, mooncake exit 0, 3 steps, 6 owners under /raid/nrl_mooncake_ssd_offload, 1,027 to 2,447 objects offloaded per owner, 17,416 files / 190 MB on the host NVMe mid-run, directories removed at exit
no /raid, nixl exit 0, 3 steps, 67 blobs spilled under /tmp/nrl_nixl_ssd; one note from the driver
NRL_NVME_DIR=/raid/scratch/$USER, nixl forced spill ray.sub created the directory on both nodes and mounted it at /raid; exit 0, 67 blobs spilled, no note

Also

  • require_offloading_store() runs only for mooncake_cpu: the guard is mooncake's, and install() keeps per-process state.
  • Tests with TQ stubbed say ssd_offload.enabled: false (there is no store to swap); the shared mooncake session client too, since that test process also holds the simple client and TQ builds one store per process. test_mooncake_ssd_offload_e2e.py covers offload itself.

Functional tests (tests/functional/grpo_dp_single_controller_tq_recovery.sh)

variant settings checks added
mooncake_units, nixl the defaults (path: null) nothing spilled: offload_rounds_total == 0 / ssd_spills_sum == 0; mooncake owners log the default NVMe directory
mooncake_cpu, nixl_ssd forced spill (enabled=true dropped, now the default) offload_rounds_total > 0, disk_evictions_total == 0 (mooncake); spills > 0 (nixl, as before)

All four pass on GB300 (one node, Qwen3-0.6B).

Verification

Unit, nightly-gym.2026-11-05 image: test_backend_config, test_factory, test_mooncake_ssd_offload, nixl/test_ssd_tier, test_tq_lifecycle, test_local_disk, test_tq_nixl_ssd, test_tq_mooncake_checkpoint: 298 passed plus test_config_v2: 52 passed (2 failures in test_ssd_tier are the open-file-count race that #5150's last commit fixes).

Real single-controller recipe on GB300, 2 nodes, 3 steps, no launcher data-plane settings beyond the backend:

run result
mooncake_cpu, recipe defaults exit 0; 6 owners created offload dirs by default; 0 spills; 0 warnings
nixl, recipe defaults exit 0; SSD tier active; 0 spills; 0 warnings
nixl, unit_slab_bytes 64 MiB exit 0; 67 blobs / 25.9 MiB spilled; one warning from the driver
mooncake_cpu, 64 MiB segment, offload_threshold 0.02 exit 0; one warning (from the controller); mem_evicted_keys_total 16,140 / 25,303 / 34,693 and mem_evicted_mb_total 111 / 171 / 232 at steps 1-3; mem_used_ratio 0.017-0.019 against threshold 0.02

Known, not changed here (follow-up): under heavy offload, a mooncake owner serving reads of offloaded objects can exhaust its 1.25 GB read arena (MOONCAKE_OFFLOAD_LOCAL_BUFFER_SIZE_BYTES, 5 s leases) and return BUFFER_OVERFLOW; TQ retries 3 x 1 s then raises. Seen in a 150 GB/node synthetic run at offload_threshold 0.5.

🤖 Generated with Claude Code

@copy-pr-bot

copy-pr-bot Bot commented Nov 10, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@zyzhou5 zyzhou5 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have test for the impact of turning on SSD offload by default when it does not exceed threshold?

Comment thread nemo_rl/data_plane/interfaces.py Resolved
Comment thread ray.sub Resolved
Comment thread nemo_rl/algorithms/single_controller.py Resolved
Comment thread examples/configs/grpo_math_1B.yaml Resolved
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia force-pushed the zhiyul/feat/ssd-offload-default branch from b702c4f to 4cecf0b Compare November 14, 2026 05:26
@ZhiyuLi-Nvidia

Copy link
Copy Markdown
Contributor Author

Do we have test for the impact of turning on SSD offload by default when it does not exceed threshold?

Two kinds now. The functional variants mooncake_units and nixl run the defaults and assert offload_rounds_total == 0 / ssd_spills_sum == 0 and no warning. For the cost, A/B on GB300 (4 nodes, 150 GB put + 300 GB read per node per step, 3 steps, hash-verified, current stack), memory sized so nothing spills:

backend, memory per unit tier put GB/s (steps 0-2) lp read train read spills / offload
nixl, 200 GiB off 45.8 / 52.3 / 56.1 25 / 56 / 66 41 / 59 / 53 -
nixl, 200 GiB on 52.7 / 57.5 / 56.0 24 / 37 / 44 34 / 44 / 47 0
nixl, 220 GiB on 38.1 / 49.3 / 47.2 31 / 49 / 54 40 / 54 / 51 0
Mooncake, 220 GiB off 53.9 / 55.1 / 57.6 32 / 60 / 59 45 / 62 / 57 -
Mooncake, 220 GiB off (repeat) 42.3 / 49.8 / 44.7 26 / 61 / 61 46 / 63 / 63 -
Mooncake, 220 GiB on, 0.8 44.4 / 45.9 / 46.0 32 / 62 / 61 45 / 62 / 58 0 rounds
Mooncake, 220 GiB on, 0.8 (repeat) 58.0 / 58.5 / 56.2 33 / 60 / 63 47 / 65 / 58 0 rounds

Run-to-run spread of one configuration is about 10 GB/s on put and 20 on reads; the tier on against off is inside it for both backends, with 0 mismatches of 16,384 rows per step everywhere. For scale, the same workload under pressure (about 94 GiB pinned per unit, half of each step on SSD): nixl put 54 / 56 / 59 GB/s with 601 to 961 spills per unit and 0 failures; Mooncake put 11.3 / 11.0 / 9.0 with 76 waits, none to a deadline.

@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia force-pushed the zhiyul/feat/ssd-offload-default branch from 4cecf0b to 9ee9223 Compare November 16, 2026 22:16
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia force-pushed the zhiyul/feat/ssd-offload-default branch from 9ee9223 to 17fc21f Compare November 16, 2026 22:51

@terrykong terrykong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR turns on the SSD tiers of both data-plane backends by default (Mooncake ssd_offload, nixl ssd), puts their folders on the node's NVMe when path is null, and logs each backend's memory and spill counters every step, with a one-time warning at the first spill.

Thanks for the A/B data in the thread, and for a clean design: the local_disk helpers are pure and testable through mounts_text, require_disk_backed runs on the node that owns the folder, both drivers share one backend_health_metrics, and ray.sub mounts a per-user NVMe folder.

C1 is a CI break: please fix it before merge.

  1. (C1) grpo_sync reads data_plane["backend"], which the grpo_train_sync test mocks lack: 51 L0 unit tests fail with KeyError.
  2. (C3) Low severity: nixl picks its default SSD folder on the node that starts TQ, unlike its own rule and Mooncake; NixlSsdConfig.dir() is unused.
  3. (C4) The default SSD folder name is shared by all users on a node, so a second user's run fails with PermissionError.
  4. (C5) The nixl_ssd functional variant now has a 256 KiB put area, double what it was written for.
  5. (C6) The 6 new Mooncake metric names copied from C++ are not checked against the shipped binary.
  6. (C7) A new test asserts field defaults, which the testing skill says not to do.
  7. (C8) The single-controller docstring's first line still says "No-op unless observability is enabled."
  8. (C9) "16 GiB pinned per unit" is now 20 GiB at the default.
  9. (C10) The README checkpoint section still calls hard-pinned replicas the default.
  10. (C11) The new README section explains code instead of usage.
  11. (C12) The MASTER_METRICS comment narrates measured runs, which the repo's comment rule moves to the commit message.
  12. (C13) Import order (ruff I001), formatting, and a missing pyrefly.toml entry.
  13. (C14) simple.ssd_offload still requires a typed path; give it the same node-NVMe default as the other two tiers.

All five of zyzhou5's threads are addressed at this head; we have nothing to add there.

GPU and RDMA tests and the L1 scripts were not run for this review (no GPU machine). The CPU unit tests were.

Generated by Claude Code

Comment thread nemo_rl/algorithms/grpo_sync.py Resolved
Comment thread nemo_rl/data_plane/adapters/tq_nixl.py Resolved
Comment thread nemo_rl/data_plane/local_disk.py Resolved
Comment thread nemo_rl/data_plane/README.md Resolved
Comment thread nemo_rl/data_plane/README.md Resolved
Comment thread nemo_rl/data_plane/nixl_storage_unit.py Resolved
Comment thread nemo_rl/data_plane/local_disk.py Resolved
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia force-pushed the zhiyul/feat/ssd-offload-default branch from 17fc21f to 4ac456c Compare November 17, 2026 22:51
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia force-pushed the zhiyul/feat/ssd-offload-default branch from 4ac456c to 6c5446b Compare November 17, 2026 23:26
Comment thread nemo_rl/data_plane/adapters/tq_nixl.py Resolved
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia force-pushed the zhiyul/feat/ssd-offload-default branch 2 times, most recently from e292d50 to 5e1224e Compare November 18, 2026 01:30
@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Nov 18, 2026
@ZhiyuLi-Nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 5e1224e

@ZhiyuLi-Nvidia ZhiyuLi-Nvidia added the CI:L1 Run doctests, unit tests, and functional tests label Nov 18, 2026
terrykong
terrykong previously approved these changes Nov 18, 2026
@ZhiyuLi-Nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 01387eb

terrykong
terrykong previously approved these changes Nov 18, 2026
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia force-pushed the zhiyul/feat/ssd-offload-default branch from 11fa6bc to d17e2b1 Compare November 18, 2026 10:16
@ZhiyuLi-Nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test d17e2b1

@ZhiyuLi-Nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test bc12d08

@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia enabled stacked auto-merge (squash) November 19, 2026 07:54
ZhiyuLi-Nvidia and others added 13 commits November 19, 2026 20:02
…arning

mooncake_cpu.ssd_offload and nixl.ssd are on by default. Both spill only
when memory is full (above offload_threshold; when a unit's put area is
full), so while memory suffices nothing is written and the default costs
nothing. simple.ssd_offload stays off: it is by value size, so every value
>= threshold_bytes would always go to SSD.

The first spill of a run logs one warning that names the volume and the
trade-off (reads of spilled data wait for the SSD) and the knobs to raise:
- nixl: from the driver, in tq_nixl.unit_metrics(), when ssd_spills_sum
  first rises above 0 (new ssd_spilled_mb_sum beside it).
- mooncake: from each segment owner's 30 s sweep, which already walks the
  offload directory; sweep_cleared_files() now returns what it saw
  (Sweep: removed, files, bytes).

path defaults to a node-local directory under /tmp. An owner refuses a
RAM-backed path (tmpfs, ramfs) at the point it creates the directory
(nemo_rl/data_plane/local_disk.py), since spilling into RAM would consume
the memory the tier is meant to relieve.

require_offloading_store() runs only for the mooncake backend; install()
keeps per-process state and the guard is mooncake's.

Tests: the stubbed mooncake tests say ssd_offload.enabled=false (TQ is
stubbed, there is no store to swap); the shared mooncake session client
too, since the test process also holds the simple client and TQ builds
one store per process. New tests: defaults on; path=None refused; tmpfs
refused; sweep statistics.

Verified on GB300 with the real single-controller recipe (2 nodes, 3
steps, exit 0 each): mooncake_cpu and nixl with recipe defaults (offload
on, no spill, no warning); nixl with a 64 MiB slab and mooncake with a
64 MiB segment and offload_threshold 0.02 (spills, one warning each, in
the driver for nixl and per owner for mooncake).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
`mooncake_cpu.ssd_offload.path` and `nixl.ssd.path` default to null, which
resolves on the node that creates the directory (local_disk.default_ssd_dir):
/raid/<name> when /raid is in /proc/mounts, not RAM-backed and writable by
the process (DGX nodes mount the NVMe RAID at /raid), else /tmp/<name>. The
tmpfs check still runs on the result. An explicit path must be absolute, as
before; the "enabled requires a path" rule is gone since null is a path now.

Two facts from the GB300 experiment shaped the rule. os.path.ismount("/raid")
is False inside an enroot container, because the container root itself lives
under /raid (same device as /), so the check reads /proc/mounts. A stock
/raid is root-owned (drwxr-xr-x): the first version resolved to it and the
owners died with PermissionError, so the directory must be writable, and the
default falls back to /tmp otherwise.

Verified with the real single-controller recipe (2 nodes, forced spills,
path null): /raid root-owned -> PermissionError before the writability rule;
/raid writable (a writable NVMe dir bind-mounted at /raid) -> nixl exit 0,
67 blobs spilled, directory gone at shutdown; mooncake exit 0, 6 owners under
/raid/nrl_mooncake_ssd_offload, 1027-2447 objects offloaded per owner
(17,416 files / 190 MB on the host NVMe mid-run), directories gone at exit.
Control without /raid: exit 0 under /tmp. Unit: 350 passed (two failures are
the open-file-count race fixed in #5150's last commit).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
…r run

The single controller reads the Mooncake master's /metrics every step and
logs data_plane/mooncake/{mem_used_mb, mem_capacity_mb, mem_used_ratio,
keys, offloaded_keys_total, offloaded_mb_total, disk_evictions_total},
the way it logs nixl's unit metrics. The metrics URL travels in the TQ
MooncakeStore config block, so the controller finds it in whichever
process it runs in. The first step with offloaded objects logs one
warning per run, with the volume, the memory use and the knobs; before,
each segment owner's sweep warned once (6 warnings on 2 nodes), and the
sweep's only job is deleting files of cleared keys again.

offloaded_* are the master's "evicted from memory" counters. With the
master flags this module sets (offload on eviction, no forced eviction)
every such object went to its owner's SSD: on the 2-node forced-spill
recipe the counter reached 34,693 objects / 232 MiB over 3 steps, and the
same recipe had 17,416 offload files on one of the two nodes mid-run.

Verified: unit 306 + 52 passed; real recipe (2 nodes, 64 MiB segments,
offload_threshold 0.02): exit 0, one warning from the SingleControllerActor,
the seven metrics logged for steps 1-3.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
…SSD tiers

The SSD tiers are on by default now, so the plain mooncake_units and nixl
recovery variants run the defaults (path null, the node's NVMe) and fail if
anything was spilled: nixl ssd_spills_sum == 0, mooncake offload_rounds_total
== 0 and disk_evictions_total == 0, and the mooncake owners must log the
default offload directory. The forced-spill variants (mooncake_cpu,
nixl_ssd) drop their now-redundant enabled=true and mooncake_cpu also checks
offload_rounds_total > 0 from the per-step metrics.

The Mooncake metric names changed with what the master can tell: it has no
per-object offload counter, and past the threshold with memory to spare it
writes SSD copies but keeps the memory copies (the forced-spill test: 112
files, 11 eviction rounds, 0 memory copies dropped). So the single controller
logs offload_rounds_total (rounds that wrote to SSD; the warning trigger)
and mem_evicted_keys_total / mem_evicted_mb_total (memory copies dropped,
whose reads go through the SSD) instead of an "offloaded objects" count.

Verified on GB300 (one node, Qwen3-0.6B, RDMA): mooncake_units,
mooncake_cpu, nixl and nixl_ssd recovery variants all pass; the
forced-spill mooncake variant logged offload_rounds_total 12 / 8 across its
two phases and one warning per phase. Unit: 306 + 52 passed.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
…te when the tiers fall back to /tmp

ray.sub mounts a per-user directory at the container's /raid, so the SSD
tiers' default lands on the node's NVMe without a config: NRL_NVME_DIR when
set (for example /raid/scratch/$USER on a cluster whose RAID root is
root-owned), else /raid/$USER, created on every node where its parent is
writable (a bare-metal DGX whose user owns /raid, or a site that provides
the directory). The source is never the shared RAID root, so two users on
one node cannot collide on /raid/nrl_*. No writable directory: no mount.

When /raid is not usable in the container the driver logs one note per run
(not mounted / RAM-backed / not writable) with what /tmp is, e.g. "ext4
mounted at /", so a user can tell a harmless case (an enroot container whose
/tmp is the NVMe RAID) from one that needs the mount or an explicit path.
The note comes from the TQ bootstrap on the driver only.

Verified on GB300, 2 nodes: defaults with no NVMe env -> exit 0, one note;
NRL_NVME_DIR=/raid/scratch/$USER with forced spills -> ray.sub created the
directory on both nodes and mounted it, no note, 67 blobs spilled under
/raid, exit 0. Unit: 308 + 52 passed.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
- nixl: the IO area is pinned beside the slab instead of carved from it, so
  turning the tier on by default no longer shrinks the put area (16 -> 12 GiB
  before) or changes max_blob_bytes; a unit with the tier on holds
  unit_slab_bytes + staging_bytes. ssd_config accepts any staging_bytes > 0.
- Mooncake offload_threshold default 0.5 -> 0.8: with the tier on by default,
  0.5 offloaded half of the memory's worth of data early.
- ray.sub lists the per-user /raid mount before the user's MOUNTS, so a bind
  of their own at or under /raid (such as /raid/scratch) stays visible.
- The backend's own counters (nixl unit metrics, Mooncake master metrics) and
  the one-time spill / offload warning are logged by grpo_sync too, through
  one helper, observability.backend_health_metrics, that the single
  controller also uses.
- Tests keep the put-area / IO-area geometry by sizing the slab as the put
  area; the staging_bytes upper-bound check is gone.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
…default

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
- grpo_train_sync test mocks set data_plane.backend, which the step's
  metrics call now reads (51 L0 tests failed with KeyError).
- The default SSD folder is per user (<name>-<uid>): the first run created
  it 0755, and a second user's run on the same node failed at start.
- nixl resolves a null ssd.path in each unit, on its own node, like
  Mooncake; ssd_config passes ssd_enabled and the raw path, and the
  unused NixlSsdConfig.dir() is gone.
- simple.ssd_offload gets the same node-NVMe default for path: null
  (enabled stays false); the overlay sends the resolved folder since TQ
  rejects an empty path.
- nixl_ssd functional variant: 128 KiB put area + 128 KiB IO area again,
  since the IO area is now pinned beside the slab.
- The Mooncake binary-name test checks every MASTER_METRICS name.
- Config test asserts dir() resolution only, not field defaults.
- Docs: single_controller docstring no longer says "No-op unless
  observability is enabled"; "16 GiB pinned" is now "16 GiB put area; 20 GiB
  pinned with the default SSD tier" (interfaces, yaml, design doc); the
  README checkpoint section names the non-default hard-pinned case; the
  README offload section is usage only, and the nixl sentence moved to
  the design doc; MASTER_METRICS comment keeps the why only (the measured
  runs: 11 rounds / 112 files with 0 memory copies dropped past the
  threshold with memory to spare; 34,693 objects dropped under pressure).
- Import order in tq_nixl and nixl_storage_unit; local_disk.py in pyrefly.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
…, now the default

The minimize-check lint hook rejects a recipe value equal to its base.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
… SSD offload on

With SSD offload on by default, a mooncake_cpu client that owns memory
swaps TQ's store class before attaching, and the guard after attaching
checks that the swapped class was built. The GDR tests faked the attach
with a no-op, so no store was ever built and the guard raised.

- Move the fake_store fixture (recording fake Mooncake store, fresh
  offload state) from test_mooncake_ssd_offload.py to conftest.py.
- The GDR tests attach the way TQ does: build the class it looks up by
  name and call setup; the attach test asserts setup got the offload
  arguments. A new test keeps the no-op attach and expects the guard to
  raise, so dropping the guard fails a test.
- The _init_tq test stubs the eviction watcher: no master runs there.
- Functional recovery suite: a mooncake_gdr variant (mooncake_cpu with
  use_gdr=true) runs SSD offload under memory pressure with GDR clients,
  checks SSD files were written and that the GDR put path was taken.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
…ng the run

require_disk_backed() refused every RAM-backed directory. That is right
for the default: /tmp as tmpfs would silently turn the SSD tier into a
second copy in memory. A path the config names is a choice, for example
the 3 GiB tmpfs that test_mooncake_ssd_eviction_stops_the_run mounts as
its small disk, so it now runs with a warning that says what it costs.
Both tiers pass whether the path was configured. The shared fake store
answers batch_is_exist so the sweep thread stays quiet in tests.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia force-pushed the zhiyul/feat/ssd-offload-default branch from bc12d08 to 2179517 Compare November 20, 2026 04:05
@ZhiyuLi-Nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 2179517

@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia merged commit 92270c9 into main Nov 20, 2026
212 of 216 checks passed
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia deleted the zhiyul/feat/ssd-offload-default branch November 20, 2026 16:00
yfw added a commit that referenced this pull request Nov 21, 2026
…kind-advantages

Brings in 69 commits, including per-environment GRPO settings
(grpo.agent_overrides, #5321) and the advantage statistics fix across
filtering and batch splitting (#5216). Two conflict blocks, both resolved by
keeping both sides:

- grpo.py: DEFAULT_POLICY_FAILURE_KINDS next to main's AgentOverrideConfig.
- test_rollout_reassembler.py: this PR's infra-failure weight test next to
  main's agent-name stamping tests.

One more change keeps this PR's test working: the sync-trainer case of
test_trainers_infra_masked_reward_never_moves_valid_siblings sets
data_plane.backend, which grpo_train_sync now reads (#5151 made the same
change to main's tests).

exclude_infra needs no change for agent_overrides: its voters do not depend
on overlong_filtering, so main's dynamic-sampling check stays limited to
masked_reward_policy "exclude". Main's ledger schema is still 8, so
failure_kind stays in schema 9.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:L1 Run doctests, unit tests, and functional tests Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants