-
Notifications
You must be signed in to change notification settings - Fork 254
Speed up XZ decompression by 5x with bufio wrapper #520
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi @vsarunas, are you making this change to target a specific HashiCorp product? Terraform is using the 1.x tag, and Packer is using the 2.x tag, so this change will likely need to be backported to one or the other (I suspect backported to 1.x but not entirely sure which tag |
Hi @crw, yes interested in Nomad which uses currently v1.7.8. I do not see a v1 specific branch. I should branch from the tag v1.7.8 release and have 2 PRs? |
Hi @vsarunas, I got caught up on the strategy here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
We'll be happy to accept this into Nomad as well, but we'll need the repo owners to merge here first.
Hi @hashicorp/team-ip-compliance -- none of the project teams have merge permissions anymore. Can you please merge this change? Thanks! |
Nomad was taking over 7.5 seconds just to extract an 11MB tar.xz archive for our use case.
Investigation led to XZ library which performs poorly without buffered I/O (ulikunitz/xz#23).
Decompression performance can be improved dramatically by introducing buffered I/O as suggested in the case.
Benchmark results (using hyperfine with identical test files served from a local
python3 -m http.server 8888
web server):Before:
After:
This represents a 5.4x speedup and should significantly improve performance when working with XZ-compressed artifacts.