Repository navigation
Description
Summary
In bundle pull, the client gives a 1.15 GiB range of a 9.56 GiB SDXL file to lon1 as one leg. lon1 serves this file at 0.3–0.6 MiB/s on every leg. The other lanes on the same file deliver 5–12 MiB/s. The leg runs alone for 33–36 min while every other node is idle, and nothing steals its tail. It sets the finish time of the whole SDXL pull. It happened in 2 of 2 SDXL runs in a 20-run batch, on the same offsets each time.
There are two separate questions here:
- Client: why does no idle lane steal the tail of a leg that runs at 0.5 MiB/s for 30+ min?
- Node: why does lon1 serve this file from its own store at 0.3–0.6 MiB/s with its
serve_streamspan 99.7% idle?
Evidence (testnet, 2026-10-06/07, CLI cdf8ece3)
pull-runner.sh batch, 20 runs, all rc=0. Host routes on (en0). SDXL 4621f13e…54ed:
| run | wall | 5a7fddce… (9.56 GiB) |
other SDXL runs |
|---|---|---|---|
| 4 | 3428 s | 2568.2 s, 8.58 GiB downloaded at 3.42 MiB/s, 1007.58 MiB spliced from disk |
1032–2372 s on 7f938e6b/5f5605df |
| 9 | 3662 s | 2495.1 s, 8.58 GiB downloaded at 3.52 MiB/s |
The other 11 files of the bundle finished in 172–1457 s in both runs.
Node side: every lon1 leg on 5a7fddce is slow (Tempo serve_stream, run 4)
| node | byte_offset + byte_len | duration | rate |
|---|---|---|---|
| lon1 | 67108864 + 128 MiB | 419 s | 0.31 MiB/s |
| lon1 | 2617245696 + 448 MiB | 1237 s | 0.36 MiB/s |
| lon1 | 3489660928 + 1152 MiB | 2141 s (22:22:26→22:58:07) | 0.54 MiB/s |
| lon1 | 5435817984 + 256 MiB | 682 s | 0.38 MiB/s |
| lon1 | 6106906624 + 320 MiB | 680 s | 0.47 MiB/s |
| lon1 | 6777995264 + 64 MiB | 179 s | 0.36 MiB/s |
| nbg1 | 6845104128 + 1536 MiB | 134 s | 11.4 MiB/s |
| ash1 | 335544320 + 1536 MiB | 308 s | 5.0 MiB/s |
| hel1 | 1946157056 + 384 MiB | 66 s | 5.8 MiB/s |
- The bold leg ends 8 s before the file completes (
22:58:15). It is the critical path. - Its span (trace
d7706195c632d7584d5500efc9704401):outcome=completed,bytes=1212678592,busy_ns7.4 s,idle_ns2133 s. It has no child spans. - lon1
decdn_bytes_received_total= 0 anddecdn_cache_origin_fetches_total= 0 from 22:10 to 23:00. So lon1 serves these ranges from its own store, with no upstream pull. Its serves count asdecdn_serve_cache_partial_hit_total. - lon1
decdn_iroh_socket_send_ipv4_totalis a flat ~1.3 MB/s from 22:20 to 22:55. The relay counter stays at ~30 B/s, so this is a direct path. - The same lon1→client path carried ~19 MB/s at 21:45 in run 2 (gpt-oss). The path itself can go faster.
- From ~22:25,
decdn_bytes_served_totalis 0 on all six other nodes. The client link carries only lon1's ~1.3 MB/s.
Run 9 repeats it on the same offsets. lon1 3489660928 + 1152 MiB ran 2003 s (00:01:45→00:35:08, trace d315c5e8610b7359c7438dd059e14f3c, busy_ns 6.0 s, idle_ns 1997 s). Its other legs were 0.32–0.88 MiB/s. In pulls9 (2026-10-06), lon1 also served the gpt-oss complement 02bd4845 at ~1 MB/s, so this may not be specific to SDXL.
Client side: the range waits, goes to lon1, and is never stolen
- From 22:15:27,
a queued range waits for a streamlists3422552064+1275068416(with2617245696+469762048,5435817984+268435456,6106906624+335544320,6777995264+67108864) withrefused=1–4 no_candidate=0. Candidate lanes exist, but theirgrow(GrowFor::Extra)is refused. This is the permit starvation in bundle pull: a restarting lane worker wins every freed provider permit, so a sibling entry's queued range waits minutes #2341. - At 22:22:26, the range starts on lon1 as one 1152 MiB leg. By then, lon1's first two legs on this file had been running for 3–7 minutes at ~0.3 MiB/s.
- No steal trims the leg. lon1's span sends
bytes=1212678592(the full 1207959552-byte range plus proof overhead) withoutcome=completed. The client logs no lane fault on that leg and no queued-range wait for this file after 22:43:32. - Steals log at debug, and the client log at
-vdoes not show lane coverage. So this run cannot say whether an idle lane covered the leg's suffix and declined, or covered none of it. Under the covered-suffix rule (client: a lane cannot steal a victim's tail unless it covers the victim's whole range, so one partial-coverage leg runs alone #2303), a lane that does not cover the range's last block cannot steal from it.
Impact
Each SDXL run lost about 30 min to one leg: 3428 and 3662 s, against 1032–2372 s in earlier batches. Most of the batch's slowdown comes from these two runs: 32 MB/s for the whole batch, against 48 MB/s in pulls8.
Not in this binary
- fix(cli): give a freed provider permit to the lane that waited first #2347 (a freed provider permit goes to the lane that waited first) merged after this batch. It can make the range start sooner on a faster lane. It does not change what happens to a slow leg once it runs.
- fix(client): log the holder record on lane-fault lines #2346 (holder record on lane-fault lines) also merged after. There was no fault on this leg, so it would not have logged anything.
Direction (not decided)
- Let an idle lane steal from a leg whose observed rate is far below the other lanes', even outside its covered suffix, if its node can serve the rest by pull-through.
- Or do not give a whole multi-GiB range to a lane whose observed rate on the same file is already an order of magnitude below the others.
- On lon1: find what the idle 99.7% of a local-store serve waits on: QUIC send, disk read, or voucher pacing.
Related
#2303 (steal needs whole-range coverage, closed; the fix limits steals to the covered suffix), #2341 / #2347 (queued range starved of permits), #2252 (one holder sets the finish time), #2256 (lon1/fra1 max_blob_size_mb = 8192; 5a7fddce is above that limit, and lon1 holds only part of it).
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity
fix(client,node): order park reads against their close, and time serv…
fix(client,node): steal a slow leg's tail by pull-through and time se…
thiras commentedon Oct 7, 2026
Testnet run with #2357 (main
64e4e884, CLI + fleet)The fleet was redeployed by ansible at 11:04–11:06 UTC on 2026-10-07. SDXL pull at 11:07:24 with
RUST_LOG=info,decdn_cli=debug,decdn_client=debug:downloaded 45.7 GB → reconstructed 76.9 GB.5a7fddce: 936.8 s (runs 4/9: 2568 / 2495 s).kind="slow_victim", 80 victim stops, 0 re-queue.Client half: fixed
lon1 got the same leg again:
3422552064 + 1275068416at 11:21:23. At 11:22:34, hel1 took its tail by pull-through:hel1 served that 1086 MB in 73 s (14.9 MB/s,
store_wait26%). A secondslow_victimsteal took 206 MB of lon1's2617245696leg at 11:23:47.The run now ends on
dc410254/e0a583ab(1567 s / 1361 s). Their gap ranges are 5–25 MB each, and bcl serves them alone, one after another. That is #2252 / #2168, not this issue.Node half: not the store; long-lived node→client connections are send-blocked
serve_streamspans on5a7fddce, 11:07–11:45 (196 sampled).b10bc9is the client.path_congestion_eventsstore_waitis <1% on the slow legs. The highstore_waitrows are pull-through legs that wait on their upstream.proof_waitis 7–13% on lon1's slow legs.cong10, cwnd 4.8 MB) ran at 11.2 MB/s, bounded by its upstream (store_wait97%).Open question
path_congestion_eventsstays at ~855 from span to span while cwnd stays flat. Two readings fit, and these fields do not separate them:Next: check how noq counts
path_congestion_events(per path or per connection), and check which receive windows the client sets on node connections. A cheap experiment is a client-side reconnect of a lane whose observed rate falls far below its own fresh-connection rate.thiras commentedon Oct 7, 2026
Follow-up: the client socket buffer is ruled out
iroh (
netwatchudp.rs) asks for a 7 MiB UDP receive buffer. Linux caps that request atnet.core.rmem_maxwithout an error, and the client host had the 208 KiB default. Two mistral pulls on the same CLI and fleet (64e4e884) test whether that matters:rmem_max208 KiBrmem_max16 MiBRcvbufErrorsdeltaconn_lost_packets, summed over node→client spans (spans overlap)path_congestion_events(max per node)7cbb48complement tail.Correction to the comment above
The client holds one connection per node (
decdn_client::Connections). The lon1 spans withpath_congestion_events0 and a 10–11 MB cwnd are therefore most likely another path of the same connection, not a new connection: lon1 has two IPs, and those spans show a different RTT (72–74 ms against 69 ms).path_*fields describe the path selected when the span ends.Where #2348's node half stands
store_wait<1%) and the client socket buffer.5a7fddcein the SDXL run, the client link carried only ~13–30 MB/s, but lon1's path still sat at a 0.3–0.8 MB cwnd. A per-path loss-rate field (lost / sent on the selected path) would show whether that path loses packets at that load.altanoruc commentedon Oct 7, 2026
Another SDXL pull without the lon1 crawl
Testnet, 2026-10-07. CLI
f8f906a6, so the client includes #2346 and #2347. The fleet runs the 11:04 UTC64e4e884deploy and restarted at 17:21 UTC, before this run. The host has-vonly (no debug).cdf8ece3) the two runs took 3428 and 3662 s. Your debug run at 11:07 took 1989 s.5a7fddce…took 784.2 s: 9.56 GiB, of which 8.58 GiB downloaded at 11.20 MiB/s and 1007.58 MiB spliced from disk. In pulls10 it took about 2500 s each time.82b29bd8926 s,e0a583ab903 s,5a7fddce784 s,dc410254898 s. No single leg ran alone at the end of the run.4db7eb10).In the same batch, gpt-oss took 807 s and 653 s (pulls10: 902–1406 s).
altanoruc commentedon Oct 7, 2026
macOS client A/B: a bigger UDP receive buffer cuts client drops ~5× but not node-side loss; lon1's route is the outlier
Testnet, 2026-10-07. CLI
f1148b4a, fleet on the64e4e884deploy. Four SDXL4621f13e…54edpulls frompull-runner.sh(-v). The client is an M1 Pro on macOS (Darwin 25.6) using Wi-Fi: 802.11ax, 5 GHz/80 MHz, -44 dBm, 1200 Mbps PHY. Host routes pin all node IPs to en0, so no node traffic goes through the VPN.Result: your Linux finding also holds on macOS. Client socket drops are a minor part of the loss the nodes count. Doubling the receive buffer cut the client's own drops ~5×, but node-side loss and wall time did not change. Most of the loss happens upstream of the client host, and lon1's route to this client is far worse than any other node's.
Setup
netwatchSOCKET_BUFFER_SIZE = 7 << 20, andrhiwat7340032 is granted.netwatchpatched to14 << 20, using[patch.crates-io]in a scratch worktree.rhiwat14680064 is granted withkern.ipc.maxsockbuf=16777216.noq-udpis built withfast-apple-datapath, so receives are batched throughrecvmsg_x(BATCH_SIZE32). decdn uses ~150% CPU across 18 threads, and no single thread is pegged.netstat -s -p udp"dropped due to full socket buffers", sampled every 5 s. Node loss is fromserve_streamspans for each run's clientpeer: Σconn_lost_bytes/ Σconn_sent_bytes.conn_*values appear to be cumulative per connection, so treat node loss as a relative indicator. A1/A2/B1/B2 have 1106/1102/1132/1105 spans each, fetched in 3-minute slices, so nothing was truncated.Client host
Per-node loss: lon1's route
Loss % over the whole run, loss % in the ramp (spans starting in the first 120 s), and median cwnd in MB:
path_congestion_events, one to two orders of magnitude above the others. In B2 one lon1 stream lost 267 MB of 602 MB sent. lon1 served nothing after the first 2 minutes of that run.path_kind=relay(rtt 0.18–1.8 s), around 1070–1110 s into the run. Those are the only non-direct spans in the four runs.macOS caveats for the receive-buffer constant
kern.ipc.maxsockbufdefaults to 8 MiB.sysctl -w kern.ipc.maxsockbuf=67108864fails withResult too large, while 16777216 is accepted. The usableSO_RCVBUFis aboutmaxsockbuf × 2048/2304, so ~14.2 MiB under a 16 MiB cap.sbreserve) instead of clamping it as Linux does.netwatchlogs that failure at debug and keepsnet.inet.udp.recvspace(768 KiB). A constant that is too large makes macOS clients worse, silently.Suggested next steps
iperf3 -uor a QUIC bulk sender. Check DO egress policing and NIC/tcdrop counters on the droplets. Since lon1→hel1 runs at 26–28 MB/s per leg, the problem is likely the route toward this client's residential ISP, not lon1 itself.min(desired, maxsockbuf × 2048/2304), and on Linux log whenrmem_maxclamps. Log the grantedSO_RCVBUFat info.thiras commentedon Oct 24, 2026
Closing: the symptom in the title is fixed and the rest of the thread is diagnosis, not a code defect.
slow_victimsteal takes the tail of a leg whose rate is far below the other lanes', by pull-through. On the first run after the fix, hel1 took 1086 MB of lon1's3422552064leg within 71 s and served it at 14.9 MB/s;5a7fddcewent from ~2500 s to 937 s. The later runs by @altanoruc (SDXL 1488 s, the four 9.56 GiB blobs finishing within 2 min of each other, no lone leg) confirm it.store_waitis <1% on the slow legs. Both client hosts (Linux and macOS) show the same picture: lon1's route to the client loses 3–35% under load with a 0.14–0.55 MB cwnd, while every other node sits at 0.04–0.6%. A bigger UDP receive buffer cuts the client socket's own drops ~5× but moves neither node-side loss nor wall time. That is a DigitalOcean-egress / transit question for the fleet, not something in this repo.Leads from the thread that are not tracked anywhere else, in case one of them should become its own issue:
min(desired, maxsockbuf × 2048/2304), Linux log whenrmem_maxclamps), and log the grantedSO_RCVBUF.serve_streamspans: a per-path loss-rate field (lost / sent on the selected path, as a span delta).iperf3 -u/ QUIC bulk test from lon1 and fra1 to a residential client, and the droplets' NIC /tcdrop counters.