-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add dist.compression-profile
option to control compression speed
#109124
Conversation
I recommend hiding the whitespace while reviewing this change, I had to change indentation of a bunch of code :( |
Do we think it makes sense to continue maintaining these options here and a semi-duplicate in rust-lang/promote-release for the recompression support? Mostly raising the question -- I think I'm not sure yet myself. Will review in detail soon. |
I think the difference between the support here and in |
Right, I mean that we could (for example) only produce .tar files in rust-lang/rust's bootstrap code, or perhaps only the Long-term I suspect that maybe zstd is the right thing for rust-lang/rust to produce, presumably that can give us fast, relatively well-compressed artifacts, and maybe works for ~everyone. Then from there recompression is maybe easy enough. We could also consider a |
r=me (maybe with @bjorn3's comment resolved) but I think we should continue thinking about the right shape here. |
@bors r=Mark-Simulacrum rollup |
…ark-Simulacrum Add `dist.compression-profile` option to control compression speed PR rust-lang#108534 reduced the size of compressed archives, but (as expected) it also resulted in way longer compression times and memory usage during compression. It's desirable to keep status quo (smaller archives but more CI usage), but it should also be configurable so that downstream users don't have to waste that much time on CI. As a data point, this resulted in doubling the time of Ferrocene's dist jobs, and required us to increase the RAM allocation for one of such jobs. This PR adds a new `config.toml` setting, `dist.compression-profile`. The values can be: * `fast`: equivalent to the gzip and xz preset of "1" * `balanced`: equivalent to the gzip and xz preset of "6" (the CLI defaults as far as I'm aware) * `best`: equivalent to the gzip present of "9", and our custom xz profile The default has also been moved back to `balanced`, to try and avoid the compression time regression for downstream users. I don't feel too strongly on the default, and I'm open to changing it. Also, for the `best` profile the XZ settings do not match the "9" preset used by the CLI, and it might be confusing. Should we create a `custom-rustc-ci`/`ultra` profile for that? r? `@Mark-Simulacrum`
Rollup of 10 pull requests Successful merges: - rust-lang#106434 (Document `Iterator::sum/product` for Option/Result) - rust-lang#108326 (Implement read_buf for a few more types) - rust-lang#108842 (Enforce non-lifetime-binders in supertrait preds are not object safe) - rust-lang#108896 (new solver: make all goal evaluation able to be automatically rerun ) - rust-lang#109124 (Add `dist.compression-profile` option to control compression speed) - rust-lang#109240 (Walk un-shifted nested `impl Trait` in trait when setting up default trait method assumptions) - rust-lang#109385 (fix typo) - rust-lang#109386 (add myself to mailmap) - rust-lang#109390 (Custom MIR: Support aggregate expressions) - rust-lang#109408 (not *all* retags might be explicit in Runtime MIR) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
PR #108534 reduced the size of compressed archives, but (as expected) it also resulted in way longer compression times and memory usage during compression.
It's desirable to keep status quo (smaller archives but more CI usage), but it should also be configurable so that downstream users don't have to waste that much time on CI. As a data point, this resulted in doubling the time of Ferrocene's dist jobs, and required us to increase the RAM allocation for one of such jobs.
This PR adds a new
config.toml
setting,dist.compression-profile
. The values can be:fast
: equivalent to the gzip and xz preset of "1"balanced
: equivalent to the gzip and xz preset of "6" (the CLI defaults as far as I'm aware)best
: equivalent to the gzip present of "9", and our custom xz profileThe default has also been moved back to
balanced
, to try and avoid the compression time regression for downstream users. I don't feel too strongly on the default, and I'm open to changing it.Also, for the
best
profile the XZ settings do not match the "9" preset used by the CLI, and it might be confusing. Should we create acustom-rustc-ci
/ultra
profile for that?r? @Mark-Simulacrum