-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
build: xz tarball extreme compression #10626
build: xz tarball extreme compression #10626
Conversation
According to the xz manpage, using Is that really worth it for <=1% difference? |
@mscdex I think it depends the download counts on the server, personally I don't feel the time increase so much, take $ time xz -9 node-v7.4.0-linux-x64.tar
real 0m20.632s
user 0m20.432s
sys 0m0.192s
$ time xz -9e node-v7.4.0-linux-x64.tar
real 0m27.529s
user 0m27.378s
sys 0m0.124s The time increases 35% more, but still only few (7) seconds 😄 |
So the average size decrease is 0.31%? I'm not sure how useful that'd be. |
It's not that significant improvement, but that 7 secs(on my computer, may be even shorter on nodejs's build server) could save more than 7 secs in total around the world if there are enough downloads count, and I guess it'll 😄 Since the tarball is static, once it's released, it'll not be touched anymore in the most cases, and could be download by millions of times (depends on the time window), even if it can only save ~ 30KB, 30KB x 1000000 = ~ 3GB, so we can every 3GB bandwidth from every million times download, from a large scale of view, the ~ 7 secs may worth it? |
@PeterDaveHello So it's 7 seconds more on your computer to compress? How much longer does it take to extract? |
@gibfahn I didn't see significant difference from the decompression time, 1.287 secs vs 1.281 secs. |
Updates on this one? |
Same question :) |
Decompression time should be the same if I understand xz's 'extreme' algorithm correctly, but the resulting file could be either bigger or smaller than without It would be interesting to see if our tarballs are persistently smaller across releases or if it's hit and miss. Any volunteers? |
@bnoordhuis across all released versions and different architecture? |
All releases might be a bit excessive but I'd be curious to see the numbers for a few releases from the v4.x, v6.x and v7.x release branches each. |
v7 already been tested as above, I'll test v4 & v6 later |
|
|
Thanks, @PeterDaveHello. Okay, so it's a win most of the time. Let's enable it but can you add it to the XZ_COMPRESSION variable on (or around) line 600 instead of passing it manually everywhere? |
Take node v7.4.0 as example, tarball size improvements listed as below: node-v7.4.0-darwin-x64.tar.xz 9176904 -> 9147884 (99.68%) node-v7.4.0-headers.tar.xz 351224 -> 349612 (99.54%) node-v7.4.0-linux-arm64.tar.xz 9271000 -> 9254748 (99.82%) node-v7.4.0-linux-armv6l.tar.xz 9243504 -> 9227428 (99.82%) node-v7.4.0-linux-armv7l.tar.xz 9246228 -> 9228732 (99.81%) node-v7.4.0-linux-ppc64.tar.xz 9448476 -> 9411128 (99.60%) node-v7.4.0-linux-ppc64le.tar.xz 9553876 -> 9521424 (99.66%) node-v7.4.0-linux-s390x.tar.xz 9923212 -> 9901772 (99.78%) node-v7.4.0-linux-x64.tar.xz 10318700 -> 10304396 (99.86%) node-v7.4.0-linux-x86.tar.xz 9907848 -> 9886448 (99.78%) node-v7.4.0-sunos-x86.tar.xz 9742620 -> 9732160 (99.89%) node-v7.4.0.tar.xz 16611356 -> 16459192 (99.08%) So that we can know that we can have the improvement on all the xz tarball releases!
@bnoordhuis done. |
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.
Thanks, LGTM. Probably no point in running the CI, I don't think it tests tarball creation.
Note to self (or any other collaborator): This is ready to merge, removing the |
Thanks @fhinkel |
PR-URL: nodejs#10626 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
Landed in 1474b7a |
PR-URL: #10626 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
landed on v6.x, let me know if it should be backed out |
PR-URL: #10626 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
Take node v7.4.0 as example, tarball size improvements listed as below:
So that we can know that we can have the improvement on all the xz
tarball releases!
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
build