Repository navigation
Description
Summary
A range-dedup entry takes one --jobs permit for its complement drive, its donor splice, and any re-fetch (bundle_pull.rs ~L2546). After its complement lands, the entry waits for the sibling fetch that will register its donor chunks (tail reconcile, ~L3270–3300), and it keeps the permit while it waits. With several dedup entries in a bundle, those waiters fill the gate and only 2 of 5 fetches download. Each run of this costs minutes at 6–15 MiB/s instead of 45–70 MiB/s.
Evidence (testnet, 2026-10-01, CLI built from 2e1a93c5)
decdn bundle pull --hash 4621f13e…954ed --namespace 1 --jobs 5 --max-lane-streams 5 (SDXL base 1.0). Result: downloaded 45.7 GB → reconstructed 76.9 GB, spliced 31.2 GB from disk, 0 failed, 34m20s.
Window 1, ~21:43–21:49 UTC: 3 of 5 fetches active, 8–15 MiB/s.
| entry | state at 21:45:22 |
|---|---|
text_encoder_2/flax_model.msgpack |
complement 1.15/1.15 GiB done, waits to splice 1.43 GiB |
text_encoder_2/openvino_model.bin |
complement 762/762 MiB done, waits to splice 1.84 GiB |
text_encoder_2/model.onnx_data |
1.67/2.59 GiB, downloading |
text_encoder_2/model.safetensors |
1.74/2.37 GiB, downloading |
text_encoder_2/model.fp16.safetensors |
600 MiB/1.29 GiB, downloading |
The donors finished at 21:49:13 (4db7eb10…, 2.59 GiB) and 21:49:16 (1b9b95e9…). The two waiters finished 2–3 s later: 89bdeffb… 2.59 GiB in 433.1s (1.15 GiB downloaded at 2.73 MiB/s, 1.43 GiB spliced) and 44711b24… 2.59 GiB in 434.0s (762.42 MiB downloaded at 1.76 MiB/s, 1.84 GiB spliced). The speed went to ~70 MiB/s at once.
Window 2, ~21:52–21:58 UTC: 2 of 5 fetches active, 6–8 MiB/s.
| entry | state at 21:53:49 |
|---|---|
sd_xl_base_1.0_0.9vae.safetensors |
complement 46.56/46.56 MiB done, waits to splice 6.42 GiB |
sd_xl_base_1.0.safetensors |
complement 1.13/1.13 GiB done, waits to splice 5.34 GiB |
unet/openvino_model.bin |
complement 1.67/1.72 GiB, then waits to splice 7.85 GiB |
unet/diffusion_pytorch_model.fp16.safetensors |
4.13/4.78 GiB, downloading |
unet/model.onnx_data |
6.25/9.56 GiB, downloading |
About 14 GiB of other entries stayed queued behind the gate. The rate rose to ~54 MiB/s when the fp16 donor finished.
The nodes were not the limit: across the fleet, decdn_bytes_served_total was ~50 MiB/s in window 2 while the client received ~6 MiB/s.
Why (code)
bundle_pull.rs~L2546: "Hold one fetch permit across the complement drive, the donor splice, and any re-fetch — one logical fetch unit."bundle_pull.rs~L3290: the tail reconcile keeps a chunk waiting while its assigned fetcher is still running, and that wait sits inside the permit scope.--jobshelp: "a range-dedup entry across its complement drive, donor splice, and any re-fetch" holds one slot.
A waiter uses no network. Holding the permit blocks a queued entry that would.
Proposed
- Release the gate permit when the complement drive ends and the entry only waits for donors. Take a permit again only if the wait ends in a re-fetch (the fetcher finished without the donor, or the donor is untrusted).
- Or keep the permit, but do not count a donor waiter against
--jobs: admit one more queued entry while it waits. - Success signal: in an SDXL pull, the number of downloading entries stays at
--jobswhile queued entries remain, and windows like the two above disappear.
Related
#2252 (the complement of one entry drains as serial requests to one holder), #2094 (chunk coalescing across entries).
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity
fix(cli): hold a dedup waiter's slot again once its donor wait ends (#…