Repository navigation
perf(data_plane): nixl SSD offloading: io_threads + ack a spilled put - #5150
Conversation
`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]>
`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]>
053b3fc to
fb29b22
Compare
`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]>
`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]>
b22572e to
8f8496f
Compare
`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]>
terrykong
left a comment
There was a problem hiding this comment.
Please rebase on main first: GitHub reports merge conflicts.
Thanks for this. Both speedups are measured on GB300 with hash checks, which makes them easy to trust. Keeping a held IO copy out of eviction during a checkpoint is fixed well in 8f8496f, with a test.
- (C1) Correctness bug: when the disk stays broken, acked spills fill the IO area, and the unit answers Busy until each put's deadline instead of failing at once. Please fix in this PR.
- (C2) No unit answers commit with "pending" any more, so the client's pending loop, its test and two comments are dead code.
- (C3) The ticker test calls
_submit_due_spillsby hand, so nothing tests that the ticker calls it. - (C4) The test module docstring and its
_commithelper still describe a pending commit.
Generated by Claude Code
8f8496f to
21a2388
Compare
`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]>
21a2388 to
4ed498c
Compare
`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]>
`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]>
|
/ok to test 86690e4 |
`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]>
|
/ok to test 3ffcfb2 |
terrykong
left a comment
There was a problem hiding this comment.
One follow-up on the C1 fix; C1–C5 are fixed, thanks.
- (C6)
_spill_erroroutlives the failed spill that set it, so a healthy unit can fail cold reads. Please fix in this PR.
Generated by Claude Code
3ffcfb2 to
d68d015
Compare
|
/ok to test d68d015 |
`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]>
`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]>
d68d015 to
5694406
Compare
`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]>
|
/ok to test 93434f2 |
@ZhiyuLi-Nvidia, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test 5694406 |
Replaced by a newer auto-merge request
A nixl storage unit ran every SSD spill write and every cold read on ONE worker thread, with plain blocking file I/O. A spilled put is acknowledged only once its file is on disk, so under memory pressure the whole step waited on that thread: on GB300 (4 nodes, 150 GB put + 300 GB read per node per step, 75 GiB slab, half of the data spilled) one thread moved about 2.5 GB/s per node and the put tail reached 5.2 s. Add data_plane.nixl.ssd.io_threads (default 4): the size of the unit's IO worker pool. Each IO job owns its IO-area region until it ends and the unit lock is not held during file I/O, so the jobs are independent. Measured on the same workload, step 2 of 3: io_threads put GB/s lp read train read put p50 / mean / max 1 (before) 19.2 38.0 40.2 65 ms / 216 ms / 5.2 s 4 29.2 53.1 57.4 46 ms / 130 ms / 0.6 s 0 hash mismatches, 0 bad rows, 0 spill failures in both runs. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Zhiyu Li <[email protected]>
…fore uncounting an IO job Review follow-up for the nixl ssd.io_threads knob: - The default (4) lives in NixlSsdConfig alone. The unit takes the configured value; its own fallback is 1 and only test helpers use it. - One range check, PositiveInt at the config boundary; the executor refuses 0 itself. - A spill job that fails or was aborted closed its file after it had already decremented _io_jobs, so "no IO job running" could be observed with the fd still open. The job now counts as running until its file is closed, which is the ownership rule the design comment states. Seen as an fd-count mismatch (111 != 112) in test_abort_during_the_write_leaves_ the_cleanup_to_the_job once the pool had more than one thread. - The unit comment states the invariant; the measurement stays in the config docstring. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Zhiyu Li <[email protected]>
Same ownership rule as the spill job: an IO job counts as running until its file is closed. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Zhiyu Li <[email protected]>
…n the IO area
A put the unit's RAM could not take was acknowledged only after its file
was on disk: commit answered "pending" while an IO worker wrote the file,
and the blob was invisible to readers until then. Under memory pressure
every producer therefore waited on NVMe. On GB300 (4 nodes, 150 GB put +
300 GB read per node per step, 75 GiB slab, half of the data spilled)
the put ran at 28-29 GB/s against 52 GB/s with nothing spilled, and more
IO threads did not move it.
Now commit publishes a spilled blob at once: its bytes are complete in
the unit's IO area after the RDMA WRITE, the same guarantee a put-area
blob has (both live in the unit's memory and die with it). The file write
runs behind the ack on the IO threads. Readers read the IO-area copy
meanwhile, and it stays after the write as a staged copy (picked up, so
it goes as soon as the area needs the room). A write that fails keeps
that copy, which is then the only one: it is never evicted, and the
ticker retries the write every SPILL_RETRY_S (5 s). A commit that finds
every IO job slot taken marks the spill due and the ticker queues it.
save_shard copies a published spill whose file is not written yet from
its IO copy, which its hold keeps alive; a blob released during the save
still raises, as before.
Measured on the same workload, step 2 of 3, 4 IO threads:
put GB/s put p50 / mean / max lp read train read
before 29.2 46 ms / 130 ms / 0.6 s 53.1 57.4
after 56.2 25 ms / 38 ms / 0.3 s 49.6 46.6
no spill 51.6 28 ms / 44 ms / 0.3 s 40.5 38.4
0 hash mismatches (16,384 rows checked per step), 0 bad rows, 0 spill
failures, 0 Busy replies. Real single-controller recipe with a 64 MiB
slab (forced spills): 3 steps, exit 0, data-plane checkpoint written.
Tests: the SSD-tier tests follow the new contract (commit done at once,
readable while the file is written, failed write kept and retried, due
spill queued by the ticker, checkpoint from the IO copy, staged-copy
eviction); _put waits for a spill's file, _disk_only drops a copy.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
…eckpoint save_shard holds a spilled blob's IO-area copy while it copies it, but a hold only stopped the release path: _evict_staged checked pins alone, so a spill whose file write ended during the copy became an evictable staged copy and a new spill or stage could reuse the region under the checkpoint. _evict_staged now skips a held copy. Test added. The NixlSsdConfig docstring no longer says a spilled put is acknowledged only once its file is written. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Zhiyu Li <[email protected]>
…rop the dead pending-commit path Review follow-ups on the ack-at-IO-area change: - A spill whose file write failed keeps its IO copy (the only copy) and is never evicted. When the disk stays broken those copies fill the IO area, and the unit answered Busy to every put until its deadline and "pending" to every cold read. The unit now records the last spill-write error (cleared by the next successful write); while it is set, an IO-area allocation that finds no room raises UnitFull naming the error, and a cold read that finds no room is reported under "failed", so the client fails at once instead of waiting out its deadline. Test added. - No unit answers commit with "pending" any more: the client's pending loop, its test and two stale comments are removed. - The ticker test waits for the unit's own ticker instead of calling _submit_due_spills by hand. - The SSD-tier test module docstring and the _commit helper described a commit that waits for the file; the docstring is updated and the helper replaced by a direct u.commit. 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]>
…ytes, not the last error _spill_error outlived the failed spill that set it: if that blob was released before its retry, a healthy unit still answered UnitFull / failed instead of Busy / pending. Track the IO bytes held by live spills whose write failed (_failed_spill_bytes) and gate _alloc_io and resolve on that. It drops when the blob's retry succeeds or the blob is released. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Zhiyu Li <[email protected]>
5694406 to
63d07ea
Compare
`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]>
|
/ok to test 63d07ea |
nixl SSD offloading optimization, in two commits on the nixl storage unit's SSD tier. Both were measured on GB300, 4 nodes, synthetic single-controller-shaped data plane: 150 GB put + 300 GB read per node per step, 75 GiB slab per unit (about half the data spilled), observability + tensor-hash verification on, step 2 of 3.
io_threads40 bad rows, 0 spill failures, 0 Busy replies in every run.
1.
data_plane.nixl.ssd.io_threads(default 4)The number of file-I/O worker threads in each unit's SSD tier. Before, every unit had exactly one, and a workload that spills a large share of each step waited on that thread for both its puts and its cold reads. One thread moved about 2.5 GB/s per node.
Safe because each IO job owns its IO-area region until it ends, and the unit lock
_muis not held during file I/O, so jobs on different threads never share a region. The design comment innixl_storage_unit.pyis updated; the one-thread property it protected (a hung disk stalls spills and cold reads, never the put area) holds for a pool too. 8 and 32 threads measured the same as 4 (28.4 / 28.7 GB/s put): the next limiter was the ack.2. A spilled put is acknowledged once its bytes are in the IO area
Before,
commitof a spilled blob answered"pending"until its file was on disk, and the blob was invisible to readers until then. Under memory pressure every producer waited on NVMe.commit: a spill whose WRITE is done is published at once; the file write is queued, or marked due when every IO job slot is taken (the 1 s ticker queues it later).resolve: a published blob with an IO-area copy is readable whether its file exists yet or not. Only a stage in progress (file to RAM) answers"pending"._spill: on success the IO region stays as a staged copy of the newest data (picked_up, evicted as soon as the area needs the room). On failure the copy is kept, never evicted whilerec.disk is None, and the ticker retries afterSPILL_RETRY_S(5 s). New stat:spill_retries.save_shard: a published spill not on disk yet is copied from its IO copy (held, so it cannot be freed under the copy).Durability is unchanged: a put-area blob is lost if the unit dies and nothing waits for it; a blob in the IO area after its WRITE has the same exposure. Design doc updated (
docs/design-docs/nixl-data-plane.md).Tests
nightly-gym.2026-11-05image):nixl/test_ssd_tier.py+test_tq_nixl_ssd.py+test_tq_nixl_checkpoint.py+test_backend_config.py: 81 passed;test_backend_config.py+test_config_v2.py(reference yaml): 52 passed. The SSD-tier tests follow the new contract: commit done at once and readable while the file is written; a failed write keeps the only copy and the ticker retries; a due spill is queued by the ticker; checkpoint copies a published spill from its IO copy; staged-copy eviction with the put's own copy present;io_threadsdefault, override and0refused.Stack: PR 1 of 3, on top of #5145 (RDMA rail selection +
UCX_MODULES=^fuse, so nixl runs withoutNCCL_NET_PLUGIN=none). Review the last six commits (8d34252e2,5fd7dda36,bea01f934,a6292cdce,352a48f41,8f8496f08) only.8f8496f08is the review fix:_evict_stagedleaves a copy thatsave_shardholds in place (a hold stopped only the release before), with a test. #5151 (SSD offload on by default) is based on this branch. Supersedes #5108 and #5152.🤖 Generated with Claude Code