Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle installation performance improvements #2564

Merged
merged 4 commits into from
Oct 23, 2024

Conversation

henrymercer
Copy link
Contributor

Make some performance improvements to bundle installation:

  • Only stream the download and extraction of bundles on Linux.
  • Only pass the archive to tar via stdin when we're streaming the download and extraction.
  • Bump the high water mark when streaming the download and extraction of the bundle to 16 MB to hopefully reduce context switching.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@henrymercer henrymercer requested a review from a team as a code owner October 22, 2024 21:07
Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

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

Seems reasonable. Do you have an idea how much time is being saved?

@henrymercer
Copy link
Contributor Author

henrymercer commented Oct 23, 2024

Good question:

  • Passing the archive via stdin seems to slow things down on macOS and Windows — on macOS from ~23s to ~28s, on Windows it is difficult to get a precise measurement since we only use zstd when explicitly specified.
  • Streaming on macOS (~20s) is faster than passing the archive via stdin (~28s), but has bad p95 performance (several minutes), so it is more reliable to download in full and pass the file to tar (~23s).
  • The high water mark I didn't observe anything over a small number of testing runs, but will see if there's a difference at larger scale.

@henrymercer henrymercer merged commit b97ec3a into main Oct 23, 2024
275 checks passed
@henrymercer henrymercer deleted the henrymercer/only-use-stdin-for-streaming branch October 23, 2024 09:54
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.

2 participants