Repository navigation
Description
Summary
In the Mistral bundle smoke pull, the range-dedup complement of consolidated.safetensors sets the finish time of every run. The complement is 2.43 GiB in 147 runs. All 147 go to one holder (bcl) as 147 separate cdn/client/v1 requests, effectively one at a time. The drive starts with the run and ends 15–203 s after the last shard finishes.
#2168 was closed for this shape. Its node half (the credit ramp, #2176) is in. The client still drives the runs serially and uncoalesced.
Evidence (testnet, 2026-09-30, CLI at ef4bb891, fleet redeployed ~15:27 UTC)
decdn bundle pull --hash 9194000d…af69e5, 5 runs from one client. Runs 1–2 went through a VPN. Every run: downloaded 17.1 GB → reconstructed 29.0 GB, spliced 11.9 GB from disk, 0 failed.
| run | wall | complement drive (first→last stream) | bcl streams | summed stream time | tail after last shard |
|---|---|---|---|---|---|
| 1 (VPN) | 698 s | 651 s | 147 | 652 s | 170 s |
| 2 (VPN) | 850 s | 808 s | 147 | 808 s | 203 s |
| 3 | 527 s | 484 s | 147 | 484 s | 15 s |
| 4 | 497 s | 448 s | 147 | 459 s | 82 s |
| 5 | 659 s | 616 s | 147 | 617 s | 67 s |
- Source: Tempo
serve_streamspans withspan.hash="7cbb4846…". The summed stream time equals the drive's span, so the requests do not overlap. - Per-request cost: each run is 2–70 MiB, with its own request and first byte (bcl
serve_first_byte_hitmean ≈ 0.25 s). In run 4, after the shards finished, single streams ran at ~15–20 MiB/s. The lane was request-bound, not bandwidth-bound. - Other holders sat idle: nbg1, lon1 and hel1 each served one ≤ 0.5 MiB stream of this entry at the start and nothing after, while 146 runs waited for bcl.
- Node counter: bcl
decdn_serve_cache_partial_hit_total+147 in each run.
Why (code)
- The complement drive holds one bundle fetch permit (
crates/cli/src/commands/bundle_pull.rs~L2546) and stripes its runs over the entry's holders by coverage (feat(cli,client): stripe a range-dedup entry's ranges across its holders #2143). bcl covers every run, so ADR 039's "a lane takes the blocks it covers first" keeps all of them on bcl. per_source_inflight = 1(ADR 039).LaneStreamCap::widen(bundle_pull.rs:1880) grants extra streams only to a faulted lane's remainder. A healthy lane never widens, even after the shard entries release bcl's other--max-lane-streamspermits.- Adjacent runs are not coalesced, so each run is its own request.
ADR 039 keeps one segment per source because "a source is bandwidth-bound". That holds for one large segment. It does not hold for 147 short runs, where each request pays its own setup.
Proposed
- Coalesce adjacent complement runs into one request per holder when the gap between them is small (pay the gap, or splice over it), as bundle pull: range-dedup complement pays ~1,300 16 KiB boundary ranges serially, one QUIC connection each #2119 option A and two-leg miss: range-dedup complement runs restart the pull-leg ramp per request and go one at a time (~1 MiB/s) #2168 proposed.
- Or let a healthy lane take free
--max-lane-streamspermits for pending complement runs, not only for a fault remainder. - Success signal: the complement finishes with the last shard, and the bundle wall time drops by the tail in the table above.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity
altanoruc commentedon Sep 30, 2026
Unchanged on a direct (non-VPN) run, 2026-09-30 18:52 UTC
One more Mistral smoke pull (
--hash 9194000d…af69e5), CLIef4bb891built fresh, VPN off.7cbb4846…serve_stream,span.hash="7cbb4846…")ad7f7e…)downloaded 17.1 GB → reconstructed 29.0 GB,spliced 11.9 GB from disk, 0 failed. This is the same shape as the five runs in the body: 147 requests to bcl, and the complement finishes last. The 78 s tail sits inside the 15–203 s range recorded there.🤖 Generated with Claude Code
altanoruc commentedon Oct 1, 2026
Unchanged across 8 more Mistral runs (2026-09-30 21:27 → 2026-10-01 05:01 UTC, CLI
ef4bb891, VPN off)These 8 Mistral smoke pulls were part of a 24-run batch. All were
rc=0, wall time 464–691 s. In every run, the complement7cbb4846…(2.42 GiB downloaded, 11.08 GiB spliced) was the last file to finish:The requests are still serial. In run 24, Tempo
serve_streamspans forspan.hash="7cbb4846…"run back to back: each starts as the previous one ends, for example 04:52:43.702 + 3.79 s → 04:52:47.494 + 3.67 s → 04:52:51.161.🤖 Generated with Claude Code
altanoruc commentedon Oct 2, 2026
Unchanged at
2e1a93c5, and the same shape on SDXL (2026-10-01/02 overnight batch, VPN off)Mistral. In each Mistral run, bcl's
decdn_serve_cache_partial_hit_totalrose by about 151 over the run window, against 147 in the original report. Examples: run b3/12 (01:50:55–01:58:24 UTC, 449 s) +151.1, and run b3/13 (01:58:25–02:14:02 UTC, 937 s) +151.7. In every Mistral run, the 13.50 GiB file was the last to finish (439–992 s).SDXL. The range-dedup complements of SDXL set the finish time in the same way:
e0a583ab…(9.56 GiB)44711b24…(2.59 GiB)e0a583ab…d4b89247…(6.46 GiB)e0a583ab…By contrast, the fully downloaded 9.56 GiB file in the same runs (
5a7fddce…) ran at 5.2–22.5 MiB/s.Over SDXL run b3/18 (02:55:36–03:41:27 UTC, 2751 s), bcl's
decdn_serve_cache_partial_hit_totalrose by +583. The other nodes rose by 0–287.So the serial complement drain is not specific to Mistral. On SDXL it costs several minutes per run.
fix(client): give a parked lane's stream permit back while it waits (#…
thiras commentedon Oct 2, 2026
Fixed in #2293: the complement now finishes with the shards
Mistral smoke pull (
--hash 9194000d…af69e5), VPN off. Every run had 0 failures and the same byte counts as in the body:downloaded 17.1 GB → reconstructed 29.0 GB, 11.9 GB spliced.41b6830dce10c78ece10c78ece10c78eAbout 40 s of "complement done" is the last runs landing plus the whole-file BLAKE3 check of 13.5 GiB (42 s on HEAD too). Once the shards finish, complement legs open at 48–57 per minute; on HEAD it was about 13.
What was wrong (three causes, all client-side)
--max-lane-streamsalready bounds the streams to one provider, so the cap only held the complement at 2 streams. The cap is gone; at a cap of 3 or more, an extra stream leaves the provider's last free permit for a sibling entry's first lane.Why not coalescing
The gaps between the 147 runs are spliced tensors: median 102 MiB, p25 27 MiB. Merging gaps up to 16 MiB cuts the requests to 130 and pays 3% more bytes. A fit of the bcl legs gives 0.33 s fixed cost per leg plus about 12 MiB/s per stream, so per-request cost is only about 20% of the old tail. The limit was stream count, not request count.
🤖 Generated with Claude Code
fix(client,cli): grow a draining lane up to its free stream permits a…