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

image-builder: Use zstd for a workspace image compression instead of gzip #13861

Closed
utam0k opened this issue Oct 14, 2022 · 11 comments
Closed

image-builder: Use zstd for a workspace image compression instead of gzip #13861

utam0k opened this issue Oct 14, 2022 · 11 comments
Labels
component: image-builder meta: stale This issue/PR is stale and will be closed soon

Comments

@utam0k
Copy link
Contributor

utam0k commented Oct 14, 2022

Is your feature request related to a problem? Please describe

Support for zstd123 compression, now we are using gzip, which is default for buildkit
zstd is said to be much faster than gzip.

dazzle has already implemented gitpod-io/dazzle#58

AFAI, the implementation is simply to add compression=zstd to the following line. So it is worth a try.

"--output=type=image,name=" + target + ",push=true,oci-mediatypes=true",

Describe the behaviour you'd like

Pull and push a workspace image with zstd.
You should be able to check the manifest using oci-tool.

Describe alternatives you've considered

Additional context

docker (or rather moby) has not yet released a version that supports zstd. Implementation is complete.

Footnotes

  1. https://www.infoq.com/news/2022/09/amazon-gzip-zstd/

  2. https://aws.amazon.com/blogs/containers/reducing-aws-fargate-startup-times-with-zstd-compressed-container-images/

  3. https://www.slideshare.net/KoheiTokunaga/starting-up-containers-super-fast-with-lazy-pulling-of-images

@kylos101
Copy link
Contributor

@utam0k can you update the issue description to better describe how this will benefit users? For example, will users see time savings when pulling container images? If yes, what is the expected time savings?

@kylos101
Copy link
Contributor

For now I've classified this change as "user quality of life". In other words, it does not seem like it is an essential change that we need "now". Is that right, @aledbf and @utam0k , that it's a nice to have? I'm just trying to make sure I understand the related motivation or "the why" for this issue.

@utam0k
Copy link
Contributor Author

utam0k commented Oct 14, 2022

@kylos101 Thanks for your comment.
We could take detailed data, but that would take some time. For example, how small the size of the image will be and the time it will take to affect the startup of the container. We didn't dare to do that this time because I need time. Do you want me to decide on a time box and take data?

@utam0k
Copy link
Contributor Author

utam0k commented Oct 14, 2022

For now I've classified this change as "user quality of life". In other words, it does not seem like it is an essential change that we need "now".

yes, However, I expect implementation to be fairly straightforward.

However, it depends on the containerd version(>=1.5), so it may be necessary to separate the case for self-hosted.

@kylos101
Copy link
Contributor

Do you want me to decide on a time box and take data?

👋 @utam0k no, thank you for asking, though. 😄 Please ignore this issue for now, let's leave in the inbox. That way, you can focus on groundwork that is either in-progress or scheduled.

@utam0k
Copy link
Contributor Author

utam0k commented Oct 14, 2022

Do you want me to decide on a time box and take data?

👋 @utam0k no, thank you for asking, though. 😄 Please ignore this issue for now, let's leave in the inbox. That way, you can focus on groundwork that is either in-progress or scheduled.

I agree with you👍 I was just going to write the issue as an idea as I don't think we should spend time on it now either.

@atduarte
Copy link
Contributor

For now I've classified this change as "user quality of life".

@kylos101 how does this benefit the end user? Shorter workspace startup times?

@kylos101
Copy link
Contributor

kylos101 commented Oct 18, 2022

how does this benefit the end user? Shorter workspace startup times?

Yes @atduarte , shorter workspace startup times on image build and pull, specifically.

We'd have to change parts of our stack, though. Dazzle, image-builder-mk3, and registry-facade. I'm not sure about IPFS. There may be others.

Related internal conversations [1][2]

edit: 👇

General zstd goodness:
https://engineering.fb.com/2016/08/31/core-data/smaller-and-faster-data-compression-with-zstandard/
https://github.com/facebook/zstd
https://lemire.me/blog/2021/06/30/compressing-json-gzip-vs-zstd/

@stale
Copy link

stale bot commented Jan 16, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Jan 16, 2023
@utam0k utam0k removed the meta: stale This issue/PR is stale and will be closed soon label Jan 16, 2023
@stale
Copy link

stale bot commented May 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label May 9, 2023
@stale stale bot closed this as completed Jun 11, 2023
@aledbf aledbf reopened this Jun 13, 2023
@stale stale bot removed the meta: stale This issue/PR is stale and will be closed soon label Jun 13, 2023
@stale
Copy link

stale bot commented Sep 16, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Sep 16, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: image-builder meta: stale This issue/PR is stale and will be closed soon
Projects
No open projects
Status: Awaiting Deployment
Development

No branches or pull requests

4 participants