Skip to content

fix(diskio): fall back to single-threaded unpacking #4717

Merged
rami3l merged 1 commit intorust-lang:mainfrom
cachebag:main
Feb 17, 2026
Merged

fix(diskio): fall back to single-threaded unpacking #4717
rami3l merged 1 commit intorust-lang:mainfrom
cachebag:main

Conversation

@cachebag
Copy link
Contributor

@cachebag cachebag commented Feb 13, 2026

Whenram_budget< 512MB, fall back to single-threaded unpacking to avoid OOM on memory-constrained systems.

Rustup OOMs on systems with <1GB RAM because it spawns multiple I/O threads for unpacking regardless of available memory. The Threaded executor uses far more memory than its buffer pool budget tracks. This PR adds a 512MB ram_budget threshold below which rustup falls back to single-threaded unpacking, which peaks at ~110MB.

Fixes #3125

@cachebag cachebag force-pushed the main branch 2 times, most recently from d5589b7 to d1fa4f5 Compare February 13, 2026 20:51
@rami3l rami3l self-assigned this Feb 13, 2026
Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this makes sense to me!

@cachebag cachebag force-pushed the main branch 2 times, most recently from cc79dba to 08bc04a Compare February 16, 2026 13:05
@cachebag cachebag force-pushed the main branch 3 times, most recently from f4b6496 to fefd937 Compare February 16, 2026 20:35
Copy link
Member

@rami3l rami3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo one final nit (my apologies for the back and forth), and thanks again for your contribution :)

… < 512MB to avoid OOM on memory-constrained systems

Rustup OOMs on systems with <1GB RAM because it spawns multiple I/O threads for unpacking regardless of available memory. The Threaded executor uses far more memory than its buffer pool budget tracks. This PR adds a 512MB ram_budget threshold below which rustup falls back to single-threaded unpacking, which peaks at ~110MB.

Fixes rust-lang#3125
@rami3l rami3l added this pull request to the merge queue Feb 17, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 17, 2026
@rami3l rami3l added this pull request to the merge queue Feb 17, 2026
Merged via the queue into rust-lang:main with commit c349460 Feb 17, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OOM installing rustc-dev with 1GB of memory

3 participants