Skip to content

two-leg proxy-warming miss still serves ~1.8 MB/s per stream after #2176 #2205

Closed

Description

@thiras

Summary

A proxy-warming two-leg miss still serves at about 1.8 MB/s per stream after #2176. The client routes the range-deduped consolidated entry of the mistral bundle through lon1, a non-holder, and lon1 pulls each range from bcl, the only holder. In the same run, bcl serves the client directly at 8–9 MB/s per stream. That two-leg entry sets the finish time of the bundle.

#2168 reported the same shape (34.8 MB in 21.5 s through lon1), and #2176 closed it. The fleet binary was installed at 05:42 UTC on 2026-09-28, after #2176 merged, and the rate is unchanged.

Evidence (testnet, 2026-09-28, CLI and fleet on 2153388b)

decdn bundle pull --hash 9194000d… --namespace 1, entry 7cbb4846… (13.5 GiB consolidated.safetensors, 2.42 GiB complement). The client logs proxy-warming: routing through nearer non-holder 5460b0a9… (lon1).

  • lon1 → client (serve_stream, Tempo, 05:59–06:04 UTC): 34.8 MB in 20.5 s, 35.8 MB in 19.8 s, 30.1 MB in 16.2 s, 12.9 MB in 8.6 s, 11.9 MB in 6.5 s, 9.0 MB in 5.1 s. That is 1.5–1.85 MB/s per stream.
  • bcl → client, direct (entry 998030d5…, same window): 36.6 MB in 4.3 s, 56.4 MB in 6.2 s, 31.3 MB in 3.8 s. That is 8.2–9.1 MB/s per stream.
  • bcl → lon1 (serve_stream on bcl, peer=5460b0…; Tempo kept only four): byte_len 1097728, 1097728, 6242304, and 1097728. The first one failed with proof 1 of at most 8 … proof stream read failed: connection lost: peer-side fault.
  • lon1 counters, 15 min into the run: decdn_node_pull_through_min_draw_waits_total 83, decdn_node_pull_through_window_paused_total 73, decdn_warming_credits_applied_total 11. decdn_bytes_received_total rate 1.5–2.5 MB/s. decdn_load_shed_streams_in_flight 2.
  • ICMP RTT from the client: fra1 58 ms, lon1 78 ms. The client link carried ~11.5 MB/s in total, so it is not the limit.

Hypotheses (not confirmed)

  1. Concurrent streams split the lane's ramp pool. ADR 003 § Credit window: a stream takes the whole pool when it starts, so concurrent streams split the lane's credit. fix(node,client,cli): keep the credit ramp across back-to-back pulls and widen bundle lanes #2176 also widens bundle lanes mid-drive. With 2 streams in flight on the client → lon1 lane, only one stream carries the ramp, and the other starts at the floor.
  2. The upstream lane lon1 → bcl restarts its ramp. The legs bcl kept are mostly 1.1 MB, the pull-window floor. The ramp pool keys on the lane and returns credit only when a stream ends fully paid. So a leg that ends early, or a leg that races a sibling leg, can leave the next leg at the floor.
  3. The min-draw rule waits too often at a small window. 83 min-draw waits against 73 window-full pauses suggest that the pull waits for half the window to open on most draws.

Next step

Re-run the 7cbb4846… entry alone, with lon1 and bcl logging decdn_node::node_origin::pull_leg and decdn_node::handlers::client at debug. Log the carried ramp credit and the opening window of each stream and each leg.

Related

#2168 / #2176 (ramp carried across back-to-back pulls), #2204 (the run's candidate sample left out nbg1 and ash1, which hold other shards).

Activity

  1. added
    kind:bug
    area:node
    on Sep 28, 2026
  2. thiras commented on Sep 28, 2026

    @thiras
    ContributorAuthor

    The run finished at 06:26 UTC: 28m05s, downloaded 17.1 GB → reconstructed 29.0 GB, 0 failed. The previous run took 18m56s for the same bytes.

    7cbb4846… finished last: 2.42 GiB downloaded at 1.49 MiB/s in 1664.8 s. At the tail, three non-holder proxies stalled one after another and left its stripe:

    Time (UTC) Provider Reason
    06:19:23 lon1 0x797e… upstream stalled: no progress for 30s
    06:20:51 fra1 0xa43d… delivery stayed below 4096 B/s for 30.0s (2305376256 of 2601573040 bytes present)
    06:21:54 hel1 0xEE08… upstream stalled: no progress for 30s
    06:21:59 hil1 0xCd21… delivery refused: NotFound

    bcl, the only holder, finished the entry. So each two-leg proxy does more than run slowly: it stalls for 30 s before the client fails over.

  3. self-assigned this
    on Sep 28, 2026
  4. thiras commented on Sep 28, 2026

    @thiras
    ContributorAuthor

    Root cause found. The upstream leg is not slow. The serve-miss stalls before its pull starts.

    Evidence (Tempo, lon1, 7cbb48, 2026-09-28). In each serve_stream trace, the handshake open_progressive_pull ends ~230 ms after the stream starts. The serve_miss_pull span starts seconds later. The gap grows over the run:

    trace start (UTC) gap
    05:58:11 2.4 s
    05:58:22 4.1 s
    06:11:46 4.1 s
    06:13:41 4.3 s
    06:16:17 4.5 s
    06:16:37 4.9 s
    06:17:57 5.4 s
    06:18:23 8.2 s

    In trace e8ba862aa40157fbe1672403bdc3cc18, the stream moves 50.1 MB in 24.3 s. Its one upstream_stream leg moves the 49.9 MB range from bcl in 6.27 s (~8 MB/s). The stream then serves for 9.6 s more after the pull ends.

    Cause. Before it spawns the pull, seed_held_outboard calls outboard_pairs over every held range of the blob. export_bao reads and verifies every leaf it exports, so each stream start re-hashes everything lon1 holds of the 13.5 GiB blob. The primed handshake pull also idles past PRIMED_MAX_IDLE (2 s). The pull then opens the same range again, and lon1 forfeits its carried ramp credit at bcl.

    Ruled out.

    • A relay path: decdn_iroh_socket_recv_data_relay_total on lon1 is ~KB/s, and the ipv4 rate is 0.9–2 MB/s.
    • Path churn: transport_ip_paths_removed ≈ 0.
    • bcl saturation: bcl egress was 5.5–6 MB/s in this window and reached ~10 MB/s later.

    Fix. The seed covers only the held part of the stream's own chunk-group-aligned range. A PR follows.

    Still open. The 9.6 s post-pull serve tail (~2.6 MB/s on lon1 → client) is not yet explained. The testnet rerun after the deploy shows whether it needs its own issue.

  5. thiras commented on Sep 28, 2026

    @thiras
    ContributorAuthor

    Rerun after #2207 (2026-09-28 07:46:54–08:15:58 UTC, CLI and fleet on 8886c85c)

    29m04s, downloaded 17.1 GB → reconstructed 29.0 GB, 0 failed. Entry 7cbb4846…: 13.50 GiB in 1739.2s (2.42 GiB downloaded at 1.43 MiB/s). The proxy was nbg1.

    #2207 works.

    • Handshake → serve_miss_pull start is ~5 ms (was 2.4–8.2 s). Example: nbg1 trace cc96b10ae8422308ebfefeeeb83b1949.
    • The primed pull is adopted: one upstream open per stream.
    • The upstream leg runs ~7 MB/s (53.6 MB in 7.6 s).

    The per-stream symptom in this issue is mostly client-link sharing, not a proxy defect.

    • The nodes served 16.9 GB in the run (fra1 9.79, nbg1 6.96, lon1 0.10, hel1 0.04), which matches the client's 17.1 GB. The aggregate rate is flat at ~10–11 MB/s from start to finish: the client's link over its VPN.
    • Every bcl serve_stream in the window has peer nbg1. That is nbg1's upstream pull, not client delivery.
    • In the same window, fra1's cache-hit streams got about the same per-stream rate as nbg1's proxy streams: ~3.2 against ~2.9 MB/s at ~1.9 and ~1.6 streams in flight.
    • The 8–9 MB/s bcl-direct figure in this issue comes from a run where bcl carried most of the link.
    • Link capacity also explains the baselines: the 18m56s run averaged ~15 MB/s, and the 28m05s and 29m04s runs averaged ~10 MB/s for the same bytes.

    Why 7cbb4846… finishes last (it does not change the total while the link is saturated):

    • The entry ran at lane width 1 on nbg1 for ~19 min. Whole-entry lane permits, mostly held by sibling entries with no live stream, filled nbg1's --max-lane-streams cap. See bundle pull: whole-entry lane permits starve a proxy lane to width 1 #2208.
    • Its last ~7.3 min was reconcile_deferred waiting on a sibling's deferred chunks, not download. So the real download rate was ~1.95 MB/s over ~1300 s.

    Other findings:

    Suggested resolution: close this issue. Its node-side cause is fixed by #2207, and the rest is tracked in #2208–#2211. One node-side question stays open. The miss-path encoder reads the cache 16 KiB per store call (AwaitingDataReader → export_range), while the hit path streams export_bao. A local benchmark of CoherentFrameProducer against ChunkFramer on a fully held 64 MiB blob would show whether that caps the proxy below the link.

  6. thiras commented on Sep 28, 2026

    @thiras
    ContributorAuthor

    Closing. #2207 fixes the node-side cause (the pre-pull stall), and the rerun confirms it. The remaining per-stream gap is client-link sharing. The follow-ups are #2208–#2211. The encoder read-granularity question (16 KiB store calls on the miss path) is recorded in the comment above, if it becomes relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodekind: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