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

Support flattened convert in userspace convertor #297

Open
1 task
djdongjin opened this issue Aug 9, 2024 · 3 comments
Open
1 task

Support flattened convert in userspace convertor #297

djdongjin opened this issue Aug 9, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@djdongjin
Copy link
Member

What is the version of your Accelerated Container Image

No response

What would you like to be added?

Support generating a single layer overlaybd image in userspace convertor

Why is this needed for Accelerated Container Image?

Our production images have many layers (~70) and we're not using Layer/Manifest Deduplication.

Sometimes we observe long latency during rpull, and the latency is proportional to the image layers. (We suspect it's due to network issue when containerd/overlaybd talks to cloud provider during rpull to get layer metadata).

Currently our mitigation is to first flatten/squash the original image into a single layer image, and then convert that single layer image. This solves the long rpull issue.

It would be great if the userspace convertor can provide a feature that generates a single-layer overlaybd image directly.

cc @shuaichang

Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.
@djdongjin djdongjin added the enhancement New feature or request label Aug 9, 2024
@BigVan
Copy link
Member

BigVan commented Aug 14, 2024

We will implement a tool to merge multiple overlaybd layers into a single

@shuaichang
Copy link

Hi @BigVan thanks for looking into this, just curious for a few questions:

  • Will the merge happen after the original image have been converted, or during the conversion?
  • Will merging overloadbd layers take long time? e.g. disk read and writes.
  • Should the merged image generally of smaller size compared to the non-flatten ones?

@BigVan
Copy link
Member

BigVan commented Aug 21, 2024

Currently, there is only a low-level tool 'overlaybd-merge' released (v1.0.13)
To merge multiple overlaybd layers, using './overlaybd-merge ${path/to/config.v1.json} ${merged_layer}' will generate a single compacted layer.
So, the userspace convertor or ctr still needs some time to integrate this tool and generate a new image manifest and image config.

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

No branches or pull requests

3 participants