Skip to content

two-leg miss: range-dedup complement runs restart the pull-leg ramp per request and go one at a time (~1 MiB/s) #2168

Closed

Description

@thiras

Summary

A range-deduped bundle entry served through a cold two-leg miss pulls its complement at ~1 MiB/s. The complement is split into many small runs, and each run:

  • is a separate cdn/client/v1 request, sent one at a time to the same provider, and
  • restarts the serving node's pull-leg credit ramp at PULL_WINDOW_FLOOR (~1 MiB).

The upstream legs to the origin node therefore stay near 1 MiB each, about 1 s per leg.

Evidence (testnet, 2026-09-26, nodes on 74b13a5c)

decdn bundle pull --hash 9194000d… --namespace 1, entry 7cbb4846… (13.5 GiB consolidated.safetensors):

  • The entry is range-deduped against the three shards. Its complement is 147 runs, 2.48 GiB, median 11.6 MiB.
  • After fra1 leaves the stripe, the client drains the runs through lon1 one at a time. One example: lon1 serves offset 1349943296 len 34799616 in 21.5 s.
  • lon1's upstream from bcl, per Tempo on bcl (peer=5460b0…): serial serve_stream legs of byte_len 1097728 / 1507328 / 1032192, ~1.0 s each. Legs do grow within one run (1.1 → 1.5 → 3.5 → 5.2 → 8.3 MB), then drop back to the floor on the next run.
  • lon1 decdn_bytes_received_total rate is ~1 MiB/s. The client shows 0.9–1.4 MiB/s for the entry for several minutes. The same bcl node serves other entries at 20–30 MiB/s.

Cause

  • Node: the pull leg's RampPacer takes paid_base: session.served_start() (crates/node/src/node_origin/pull_leg.rs:870, :1502). Its window is paid/divisor (crates/incentive/src/credit.rs, default divisor 2). Each new downstream request starts again at the floor (crates/client/src/pacer.rs:56).
  • Client: LiveSessions::drive sets a stripe lane's width once, from a non-blocking lane_cap.try_extra (crates/cli/src/commands/bundle_pull.rs:3399-3408). While sibling shard entries hold the provider's permits the width is 1, and it never grows when they finish. So the runs go to the provider one at a time.

Fix shape

  • Node: key the ramp's paid history on the (peer, hash) lane or the fill session, so back-to-back requests from one payer keep their ramp.
  • Client: coalesce several complement runs into one request, or re-check try_extra between gaps so the width can grow.

Related

#2061 (draws collapse to ~1 MiB; closed) and #2119 (serial 16 KiB boundary ranges; closed) fixed neighbouring cases. This is the per-request ramp reset across many medium-sized runs.

Tests

None cover the ramp restarting per request across many ranges, or the fixed stripe width.

Activity

  1. self-assigned this
    on Sep 26, 2026
  2. added
    kind:bug
    rust
    area:cli
    area:node
    on Sep 26, 2026
  3. moved this from In progress to Done in deCDNon Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:cliarea:nodekind:bugrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions