Skip to content

Separate Bundler download, installation, and metadata concurrency - #9777

Open
joshuay03 wants to merge 1 commit into
ruby:masterfrom
joshuay03:separate-download-jobs
Open

Separate Bundler download, installation, and metadata concurrency#9777
joshuay03 wants to merge 1 commit into
ruby:masterfrom
joshuay03:separate-download-jobs

Conversation

@joshuay03

@joshuay03 joshuay03 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

What was the end-user or developer problem that led to this PR?

Bundler sizes compact-index metadata concurrency from processor count and uses BUNDLE_JOBS for both CPU-heavy installation and network-heavy gem downloads.

What is your fix for the problem, implemented in this PR?

Add BUNDLE_DOWNLOAD_JOBS and BUNDLE_METADATA_JOBS, and make BUNDLE_JOBS installation-only. Downloads default to 3× installation jobs, capped at 8; metadata defaults to download jobs. Parallel default-gem lookups are serialized so download workers do not race while refreshing the shared compact-index cache.

This lets downloads overlap installation without consuming its worker slots, while keeping I/O concurrency bounded on large machines. Across five alternating cold-cache Docker builds per variant, median install time improved by 8.5% (66.0s versus 72.1s) and mean install time improved by 9.2% (67.2s versus 74.0s).

Make sure the following tasks are checked

  • I wrote tests for this PR
  • I updated the relevant documentation

@joshuay03
joshuay03 force-pushed the separate-download-jobs branch 2 times, most recently from 58b24f1 to 1f928f3 Compare August 16, 2026 23:17
@joshuay03 joshuay03 changed the title Separate download and installation concurrency Separate Bundler installation and I/O concurrency Aug 16, 2026
@joshuay03
joshuay03 force-pushed the separate-download-jobs branch 3 times, most recently from 78245cf to 9da6fe0 Compare August 16, 2026 23:26
@joshuay03 joshuay03 changed the title Separate Bundler installation and I/O concurrency Separate Bundler install, download, and metadata concurrency Aug 16, 2026
@joshuay03 joshuay03 moved this to On Hold in Open Source Aug 16, 2026
@joshuay03 joshuay03 moved this from On Hold to In Progress / Pending Review in Open Source Aug 16, 2026
@joshuay03
joshuay03 force-pushed the separate-download-jobs branch 3 times, most recently from 71f2793 to 14daf5c Compare August 17, 2026 03:11
@joshuay03 joshuay03 changed the title Separate Bundler install, download, and metadata concurrency Separate Bundler installation, download, and metadata concurrency Aug 17, 2026
@joshuay03
joshuay03 force-pushed the separate-download-jobs branch 2 times, most recently from e35b8c0 to c5d6166 Compare August 17, 2026 03:17
@joshuay03 joshuay03 changed the title Separate Bundler installation, download, and metadata concurrency Separate Bundler download, installation, and metadata concurrency Aug 17, 2026
@joshuay03
joshuay03 force-pushed the separate-download-jobs branch from c5d6166 to 5605a3a Compare August 17, 2026 03:45
@joshuay03
joshuay03 force-pushed the separate-download-jobs branch from 5605a3a to 36d082b Compare August 17, 2026 04:14
@joshuay03
joshuay03 marked this pull request as ready for review August 17, 2026 04:42
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.

1 participant