Skip to content

perf(data_plane): acknowledge a spilled nixl put once its bytes are in the IO area - #5152

Merged
ZhiyuLi-Nvidia merged 1 commit into
zhiyul/feat/nixl-ssd-io-threadsfrom
zhiyul/feat/nixl-ack-spill-at-io-area
Nov 10, 2026
Merged

ZhiyuLi-Nvidia merged 1 commit into
zhiyul/feat/nixl-ssd-io-threadsfrom
zhiyul/feat/nixl-ack-spill-at-io-area

Conversation

@ZhiyuLi-Nvidia

Copy link
Copy Markdown
Contributor

Stack: on top of #5150 (nixl.ssd.io_threads). Review the last commit only.

What

A spilled nixl put is acknowledged as soon as its bytes are in the unit's IO area. The file write runs behind the ack.

Why

Before, commit of a spilled blob answered "pending" until the file was on disk, and the blob was invisible to readers until then. Under memory pressure every producer waited on NVMe: on GB300 (4 nodes, 150 GB put + 300 GB read per node per step, 75 GiB slab, about half of the data spilled) put ran at 28–29 GB/s against 52 GB/s with nothing spilled, and 4, 8 or 32 IO threads all landed at about 28.

How

  • commit: a spill whose WRITE is done is published at once (its index is parsed from the IO area, as before); 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 → RAM) answers "pending".
  • _spill: on success the IO region stays as a staged copy of the newest data (picked_up, so it is evicted as soon as the area needs the room). On failure the copy is kept, it is never evicted while rec.disk is None, and the ticker retries after SPILL_RETRY_S (5 s). New stats: 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). A blob released during the save still raises.

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.

Measured (same 150 GB/node workload, step 2 of 3, 4 IO threads)

put GB/s put p50 / mean / max lp read train read hash
before (#5150) 29.2 46 ms / 130 ms / 0.6 s 53.1 57.4 0 / 16,384
after 56.2 25 ms / 38 ms / 0.3 s 49.6 46.6 0 / 16,384
no spill (200 GiB slab) 51.6 28 ms / 44 ms / 0.3 s 40.5 38.4 0 / 16,384

Steps 0–2 after: put 53.6 / 62.5 / 56.2 GB/s. 0 bad rows, 0 spill failures, 0 Busy replies; 171–267 GB spilled per unit over 3 steps.

Tests

  • Unit (nightly-gym.2026-11-05 image): nixl/test_ssd_tier.py + test_tq_nixl_ssd.py + test_tq_nixl_checkpoint.py + test_backend_config.py: 81 passed. SSD-tier tests rewritten for the contract: commit done at once and readable while the file is written; 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 and still skips an uncommitted one; staged-copy eviction with the put's own copy present.
  • Real single-controller recipe on GB300, 2 nodes, nixl, 64 MiB slab (forced spills): 3 steps, exit 0, 68–70 spills per unit, 0 failures, step-3 data-plane shards written.

Design doc updated (docs/design-docs/nixl-data-plane.md, design points).

🤖 Generated with Claude Code

…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]>
@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.

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Nov 10, 2026
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia merged commit 053b3fc into zhiyul/feat/nixl-ssd-io-threads Nov 10, 2026
9 of 11 checks passed
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia deleted the zhiyul/feat/nixl-ack-spill-at-io-area branch November 10, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant