rust-lang / rust-lang/rustup

Download speed becomes absurdly high for 6 seconds after resuming from a partial download

Open
#1,166 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Repro step:

  1. Download anything (e.g. rustup update, rustup add target, etc.)
  2. When download is partially complete (say 50%), Ctrl+C to kill it
  3. Resume download (run step 1 again).
  4. The download will start from 50%, and the speedometer extremely high, and the ETA being misleadingly short. The numbers will become normal after a few seconds.

Demo at https://asciinema.org/a/b5ayrzn7naj6td6qegq0xxyql. The speed should be around ~100 KiB/s, but at 00:59 where the download is resumed, the speed was reported to be ~1.0 MiB/s for 6 seconds, and suddenly goes back to ~100 KiB/s at 01:05.

It seems the speed calculation include the partially downloaded bytes, which it should not.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by interrupting a partial download and resuming it, then locate the download progress and speed-calculation entry points; the payload names no files or tests. Check how already-downloaded bytes affect the initial rate and ETA. Done means resumed downloads report a rate based only on newly transferred bytes and show a reasonable ETA from the start.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.