Skip to content

bundle pull: a 1.15 GiB leg on a 0.5 MiB/s lon1 lane runs alone for 35 min while every other lane is idle (SDXL, 2 of 2 runs) #2348

Closed

Description

@altanoruc

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:

  1. Client: why does no idle lane steal the tail of a leg that runs at 0.5 MiB/s for 30+ min?
  2. Node: why does lon1 serve this file from its own store at 0.3–0.6 MiB/s with its serve_stream span 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_ns 7.4 s, idle_ns 2133 s. It has no child spans.
  • lon1 decdn_bytes_received_total = 0 and decdn_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 as decdn_serve_cache_partial_hit_total.
  • lon1 decdn_iroh_socket_send_ipv4_total is 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_total is 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

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

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).

Activity

  1. self-assigned this
    on Oct 7, 2026
  2. thiras commented on Oct 7, 2026

    @thiras
    Contributor

    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:

    • 1989 s wall (runs 4/9: 3428 / 3662 s). rc=0, 52 fetched + 4 linked, 0 failed, 0 client WARNs. downloaded 45.7 GB → reconstructed 76.9 GB.
    • 5a7fddce: 936.8 s (runs 4/9: 2568 / 2495 s).
    • 113 steals in total: 33 kind="slow_victim", 80 victim stops, 0 re-queue.

    Client half: fixed

    lon1 got the same leg again: 3422552064 + 1275068416 at 11:21:23. At 11:22:34, hel1 took its tail by pull-through:

    kind="slow_victim" split=3615866880 stolen=1081753600 victim_range=(3422552064, 193314816) stealer_rate=13480922 victim_rate=1276794
    

    hel1 served that 1086 MB in 73 s (14.9 MB/s, store_wait 26%). A second slow_victim steal took 206 MB of lon1's 2617245696 leg 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_stream spans on 5a7fddce, 11:07–11:45 (196 sampled). b10bc9 is the client.

    node → peer MB/s per leg store / send / proof wait rtt cwnd at span end path_congestion_events
    lon1 → client (long-lived conn) 1.5 <1% / 86–92% / 7–13% 69 ms 0.3–0.8 MB 854–857
    lon1 → client (new conn) 22–25 ~50% / 10–14% / ~3% 72–74 ms 10.5–11.3 MB 0
    lon1 → hel1 (node) 26–28 ~5% / ~90% / ~3% 35 ms 3.0–3.6 MB 0–3
    bcl → client 1–2.4 <1% / 40–95% / 3–96% 164 ms 0.4–1.3 MB 886–915
    ash1 → client 1.3–6.5 ~1% / 60–89% / 10–38% 140 ms 0.4–1.1 MB 1593–1616
    hel1 → client 10–15 2–98% / 0–89% / 1–24% 83 ms 1.1–8.3 MB 843–972
    • lon1's store is ruled out. store_wait is <1% on the slow legs. The high store_wait rows are pull-through legs that wait on their upstream.
    • Voucher pacing is minor. proof_wait is 7–13% on lon1's slow legs.
    • Most of the slow time is send wait, on connections whose cwnd stays at 0.3–0.8 MB after ~855 congestion events. A new connection on the same lon1→client path, in the same run, starts at a 10–11 MB cwnd and runs 15× faster. bcl and ash1 show the same shape, so this is not specific to lon1.
    • The 1407 MB lon1 leg on a nearly fresh connection (cong 10, cwnd 4.8 MB) ran at 11.2 MB/s, bounded by its upstream (store_wait 97%).

    Open question

    path_congestion_events stays at ~855 from span to span while cwnd stays flat. Two readings fit, and these fields do not separate them:

    1. The cwnd collapsed in the loss burst at pull start, when every lane ramped together into the client's downlink. It does not regrow because the sender is app-limited.
    2. The client's stream or connection receive window, or client-side read stalls (client: a leg that faults mid-pull is logged nowhere and its range waits for a busy lane (serial tail) #2230), blocks the sender, and the frozen cwnd is a side effect.

    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.

  3. thiras commented on Oct 7, 2026

    @thiras
    Contributor

    Follow-up: the client socket buffer is ruled out

    iroh (netwatch udp.rs) asks for a 7 MiB UDP receive buffer. Linux caps that request at net.core.rmem_max without 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:

    A: rmem_max 208 KiB B: rmem_max 16 MiB
    wall 9m34s 7m05s
    client RcvbufErrors delta +130 0
    client NIC drops 0 0
    conn_lost_packets, summed over node→client spans (spans overlap) ash1 115k, lon1 17k, bcl 3.9k ash1 36k, lon1 5k, bcl 2.2k
    path_congestion_events (max per node) 498–4331 209–932
    median MB/s per leg 3.3–16 2.9–6.5
    • The bigger buffer removes the client socket's drops. Those drops are about 0.1% of the losses that the nodes count.
    • The node→client loss happens upstream of the client host, at its router or ISP. Node→node paths show near-zero loss and run at 26–28 MB/s per leg.
    • The wall-time gap is run-to-run variance. Both runs end on the same bcl-only 7cbb48 complement tail.

    Correction to the comment above

    The client holds one connection per node (decdn_client::Connections). The lon1 spans with path_congestion_events 0 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

    • Ruled out: lon1's store (store_wait <1%) and the client socket buffer.
    • Most likely cause: path loss on the client's access link under many concurrent flows. Each node's congestion controller (BBR3) then holds its connection to a small cwnd. Per-leg rates (~3 MB/s) are close to a fair share of a ~50 MB/s client link across 15–20 flows.
    • Not yet explained: during 5a7fddce in 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.
  4. removed their assignment
    on Oct 7, 2026
  5. altanoruc commented on Oct 7, 2026

    @altanoruc
    ContributorAuthor

    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 UTC 64e4e884 deploy and restarted at 17:21 UTC, before this run. The host has -v only (no debug).

    • SDXL took 1488 s, rc=0, from 17:43:27 to 18:08:15 UTC. In pulls10 (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.
    • The four 9.56 GiB blobs finished within 2 minutes of each other: 82b29bd8 926 s, e0a583ab 903 s, 5a7fddce 784 s, dc410254 898 s. No single leg ran alone at the end of the run.
    • lon1 faulted once in the whole run ("no verified progress for 10s" at 17:47:37 on 4db7eb10).

    In the same batch, gpt-oss took 807 s and 653 s (pulls10: 902–1406 s).

  6. altanoruc commented on Oct 7, 2026

    @altanoruc
    ContributorAuthor

    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 the 64e4e884 deploy. Four SDXL 4621f13e…54ed pulls from pull-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

    • A = stock: netwatch SOCKET_BUFFER_SIZE = 7 << 20, and rhiwat 7340032 is granted.
    • B = the same commit with netwatch patched to 14 << 20, using [patch.crates-io] in a scratch worktree. rhiwat 14680064 is granted with kern.ipc.maxsockbuf=16777216.
    • noq-udp is built with fast-apple-datapath, so receives are batched through recvmsg_x (BATCH_SIZE 32). decdn uses ~150% CPU across 18 threads, and no single thread is pegged.
    • Client drops come from netstat -s -p udp "dropped due to full socket buffers", sampled every 5 s. Node loss is from serve_stream spans for each run's client peer: Σconn_lost_bytes / Σconn_sent_bytes.
    • Spans overlap and the 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

    run buffer wall client drops, first 70 s client drops, whole run max Recv-Q node loss, whole run (all nodes) median cwnd (all nodes)
    A1 7 MiB 1379 s ~24k (manual samples) n/a 7.3 MB 0.47% 1.68 MB
    A2 7 MiB 1227 s 56,933 (3.30%) 103,904 (0.30%) 6.8 MB 0.67% 1.92 MB
    B1 14 MiB 1234 s 12,426 (0.76%) 13,351 (0.04%) 11.4 MB 0.48% 4.33 MB
    B2 14 MiB 1308 s 13,350 (0.69%) 24,134 (0.07%) 13.3 MB 0.72% 4.47 MB
    • The 7 MiB buffer is too small for ramp. In A, the client socket overflows in the first minute: up to 10% in one 5 s window. B's queue goes to 13.3 MB, so 7 MiB is clearly too small at ~45 MB/s, where it holds only ~150 ms.
    • Node-side loss did not follow. B's client drops fell ~5×, but node loss stayed at 0.5–0.7%. So the client socket is not where most of the loss happens.
    • Median cwnd roughly doubled in B, but almost all of that came from the long-RTT US nodes: bcl 1.85/2.32 → 4.60/4.27 MB and ash1 1.51/4.45 → 8.25/5.71 MB. hel1, nbg1 and fra1 are mixed. Wall time is within run-to-run noise. Two runs per arm cannot separate a small effect.
    • Stall faults: B had 20 "no verified progress for 10s" faults and A had 0. They cluster on fra1, lon1 and nbg1 at a few moments (21:56:41, ~22:10, 22:20:37). The A binary had similar lon1, bcl and ash1 clusters throughout the 20-run pulls14 batch earlier the same day, so I don't attribute them to B.

    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:

    node loss A1 / A2 / B1 / B2 ramp loss A1 / A2 / B1 / B2 cwnd A1 / A2 / B1 / B2
    hel1 0.08 / 0.11 / 0.14 / 0.07 0.28 / 0.95 / 0.71 / 0.23 3.02 / 1.79 / 1.19 / 3.90
    bcl 0.08 / 0.15 / 0.04 / 0.18 0.18 / 1.37 / 0.26 / 0.63 1.85 / 2.32 / 4.60 / 4.27
    fra1 0.33 / 0.31 / 0.40 / 0.31 2.22 / 0.93 / 1.21 / 0.57 0.57 / 0.52 / 0.63 / 0.28
    lon1 2.99 / 11.88 / 11.07 / 35.51 24.3 / 10.9 / 14.6 / 35.5 0.20 / 0.14 / 0.17 / 0.55
    ash1 0.15 / 0.51 / 0.43 / 0.08 0.41 / 1.98 / 2.02 / 0.30 1.51 / 4.45 / 8.25 / 5.71
    nbg1 0.13 / 0.45 / 0.04 / 0.63 0.73 / 2.51 / 0.11 / 1.67 3.10 / 0.92 / 0.96 / 1.36
    hil1 (2–12 spans) 3.99 / 14.44 / 3.24 / 1.58 18.1 / 14.6 / 3.2 / — 8.06 / 5.79 / 12.16 / 5.87
    • lon1 is the outlier in every run. It loses 3–35% with a cwnd of 0.14–0.55 MB and 21k–36k 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.
    • Shared-path loss is too low to explain lon1. Every node shares the Wi-Fi, the ISP access link and the client socket, so loss there is bounded by the best nodes: 0.04–0.18% (bcl, nbg1, hel1). lon1's extra loss is on its own route.
    • The loss appears only under load. During A1, 100 ICMP pings at 10/s to every node lost nothing (bcl blocks ICMP). lon1's route drops bursts.
    • fra1 has the second-smallest cwnd (0.28–0.63 MB) at only 54–81 ms RTT. lon1 (138.68.x) and fra1 (206.189.x) are the two DigitalOcean nodes. In B1 they stalled in the same second while no other node did. That points to DO egress, or DO's transit toward this client. It does not separate the two.
    • bcl relay spans: B2 had 4 bcl spans on 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

    • The cap is low. kern.ipc.maxsockbuf defaults to 8 MiB. sysctl -w kern.ipc.maxsockbuf=67108864 fails with Result too large, while 16777216 is accepted. The usable SO_RCVBUF is about maxsockbuf × 2048/2304, so ~14.2 MiB under a 16 MiB cap.
    • Too large a request makes things worse. XNU rejects a request above the limit (sbreserve) instead of clamping it as Linux does. netwatch logs that failure at debug and keeps net.inet.udp.recvspace (768 KiB). A constant that is too large makes macOS clients worse, silently.

    Suggested next steps

    1. lon1 (and fra1): test DO→client throughput directly at a fixed rate, against a Hetzner node to the same client, e.g. iperf3 -u or a QUIC bulk sender. Check DO egress policing and NIC/tc drop 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.
    2. Client receive buffer: worth fixing, but it is not the bundle pull: a 1.15 GiB leg on a 0.5 MiB/s lon1 lane runs alone for 35 min while every other lane is idle (SDXL, 2 of 2 runs) #2348 fix. Request a platform-aware size: on macOS min(desired, maxsockbuf × 2048/2304), and on Linux log when rmem_max clamps. Log the granted SO_RCVBUF at info.
    3. Scheduler: since one node's route can sit at 10–35% loss for a whole run, the client could stop giving new legs to a provider whose observed rate is an order of magnitude below the others for the same file. fix(client,node): steal a slow leg's tail by pull-through and time serve waits (#2348) #2357's slow-victim steal already covers the tail case.
    4. Spans: a per-path loss-rate field (lost / sent on the selected path, as a delta for the span) would remove the overlap arithmetic above.
  7. added
    area:client
    kind:bug
    on Oct 21, 2026
  8. thiras commented on Oct 24, 2026

    @thiras
    Contributor

    Closing: the symptom in the title is fixed and the rest of the thread is diagnosis, not a code defect.

    • Client half, fixed by fix(client,node): steal a slow leg's tail by pull-through and time serve waits (#2348) #2357. The slow_victim steal 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's 3422552064 leg within 71 s and served it at 14.9 MB/s; 5a7fddce went 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.
    • Node half, not the store. store_wait is <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:

    1. Scheduler: stop handing new legs to a provider whose observed rate on the same file is an order of magnitude below the others (the steal covers the tail case only).
    2. Client UDP receive buffer: a platform-aware request (macOS min(desired, maxsockbuf × 2048/2304), Linux log when rmem_max clamps), and log the granted SO_RCVBUF.
    3. serve_stream spans: a per-path loss-rate field (lost / sent on the selected path, as a span delta).
    4. Fleet: an iperf3 -u / QUIC bulk test from lon1 and fra1 to a residential client, and the droplets' NIC / tc drop counters.
  9. moved this from Backlog to Done in deCDNon Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clientkind:bug

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions