-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Switch to using xz compressed packages? #77
Comments
Did a little experimenting with the recent 5.2.0 image. The build time on my mac is pretty close: xz:
gz:
|
One thing to note for the above: I already had the base image layers on my mac. The build times on a "clean" docker host would be longer for both. |
Image sizes! The 5.2.0 image using the current gz compression:
xz compression:
Ha! This makes sense though: in both cases it's a single RUN command that gets saved as a new layer. And the final size of node should be the same. So there could be an improvement to the upstream build time of the image (and the different variants), but it might not be very significant. Probably worth running a few more tests. |
Thanks for this thorough comparison @chorrell! As you mention this will not have an impact for most users (unless they build the image themselves). Since [1] Quick Benchmark: Gzip vs Bzip2 vs LZMA vs XZ vs LZ4 vs LZO |
Thanks! Yeah, that's pretty much how I lean too. I'll follow up with the upstream Docker people and see what they think. |
A few things to note:
|
I'm definitely +1 to xz! 😄
FWIW, you can add "xz-utils" to $buildDeps for the slim variants (
https://github.com/nodejs/docker-node/blob/062488d2751e15c34996a2d76112975f39d98ae0/0.10/slim/Dockerfile#L19)
and then it'll be removed afterwards too.
|
OK cool. Yeah, unfortunately there are no xz compressed packages for 0.10 and 0.12. We'll need to do something similar for the 4.2.x and 5.3.x images |
Next patch release of Node.js v0.10 and v0.12 will have |
Great! |
I noticed that there are xz packages available. For instances of v4.2.3 (via https://nodejs.org/dist/v4.2.3/)
We've been using the .gz package in all out Dockerfiles. Should we switch to xz? The download would be faster, but I'm not sure what affect it would have on the image build. My understanding of xz is that compression takes a while, but decompression is fast. I'll do a bit of testing this week and see how things play out.
The text was updated successfully, but these errors were encountered: