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

init: Use multithreaded xz decompression (-T0) #71

Merged
merged 1 commit into from
Feb 18, 2024
Merged

Conversation

ermo
Copy link
Contributor

@ermo ermo commented Feb 17, 2024

On my AMD Ryzen R7 2700X, unxz of a ~260MiB unstable .img.xz takes 30s. In comparison, unxz -T0 of the same ~260MiB unstable .img.xz takes 4s.

According to the xz release notes, multithreaded compression has been supported since xz version 5.2.0, which was released in 2014.

xz 5.2.2 was added to the Solus repos in October 2016, so all Solus installs since then would have supported multi-threaded decompression, making the addition of the -T0 flag in solbuild guaranteed to work on existing systems.

The end result is a nicer user experience when updating solbuild images.

@ermo ermo added the enhancement New feature or request label Feb 17, 2024
@ermo ermo requested a review from silkeh February 17, 2024 19:22
On my AMD Ryzen R7 2700X, unxz of a ~260MiB unstable .img.xz takes 30s.
In comparison, unxz -T0 of the same ~260MiB unstable .img.xz takes 4s.

According to the xz release notes, multithreaded compression has been
supported since xz version 5.2.0, which was released in 2014.

xz 5.2.2 was added to the Solus repos in October 2016, so all Solus
installs since then would have supported multi-threaded decompression,
making the addition of the -T0 flag in solbuild guaranteed to work on
existing systems.

The end result is a nicer user experience when updating solbuild images.

Signed-off-by: Rune Morling <[email protected]>
Copy link
Member

@silkeh silkeh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@silkeh silkeh merged commit 9d02348 into master Feb 18, 2024
1 check passed
@joebonrichie joebonrichie deleted the parallel-unxz branch March 24, 2024 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants