-
Notifications
You must be signed in to change notification settings - Fork 123
PoC of "additional layer store" of Podman/CRI-O and lazy pulling of zstd:chunked #281
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
Signed-off-by: Kohei Tokunaga <[email protected]>
@@ -66,6 +67,11 @@ When '--all-platforms' is given all images in a manifest list must be available. | |||
Usage: "eStargz chunk size", | |||
Value: 0, | |||
}, | |||
// zstd:chunked flags | |||
cli.BoolFlag{ | |||
Name: "zstdchunked", |
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.
nit: zstdchunked
-> zstd-chunked
(just my preference)
|
||
const ( | ||
defaultLogLevel = logrus.InfoLevel | ||
defaultRootDir = "/var/lib/registry-storage" |
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.
Shouldn't this be something like /var/lib/stargz-registry-storage
?
Shouldn't the exec name be like |
3582d54
to
e110f40
Compare
Signed-off-by: Kohei Tokunaga <[email protected]>
…zstd:chunked) This is the subset of containerd#281. Initially, eStargz is based on gzip compression. But, through zstd:chunked work, it turned out that eStargz is not limited to gzip compression and the same chunking & verifying & prefetching method can be applied to other compression algorithms as well (e.g. zstd). This commit makes `estargz` pkg configurable and agnostic about compression algorithms. For supporting non-gzip compression, the user must implement `estargz.Decompressor` and `estargz.Compressor` interfaces and must plug them to `estargz` tools (e.g. `estargz.Open` and `estargz.NewWriterWithCompression`). `estargz` also provides test suite that is usable for testing these non-gzip eStargz implementations. This commit comes with `zstdchunked` pkg that support zstd compression for eStargz (a.k.a. zstd:chunked), based on the above extensibility. `zstdchunked` pkg contains `zstdchunked.Decompressor` and `zstdchunked.Compressor` that allows `estargz` pkg to use zstd compression (i.e. zstd:chunked) instead of gzip. Layer converter and filesystem now support zstd:chunked leveraging `zstdchunked` pkg. `ctr-remote image optimize` and `ctr-remote image convert` support `--zstdchunked` option that omits zstd-based eStargz and filesystem supports zstd-based eStargz layers by default. Signed-off-by: Kohei Tokunaga <[email protected]>
…zstd:chunked) This is the subset of containerd#281. Initially, eStargz is based on gzip compression. But, through zstd:chunked work, it turned out that eStargz is not limited to gzip compression and the same chunking & verifying & prefetching method can be applied to other compression algorithms as well (e.g. zstd). This commit makes `estargz` pkg configurable and agnostic about compression algorithms. For supporting non-gzip compression, the user must implement `estargz.Decompressor` and `estargz.Compressor` interfaces and must plug them to `estargz` tools (e.g. `estargz.Open` and `estargz.NewWriterWithCompression`). `estargz` also provides test suite that is usable for testing these non-gzip eStargz implementations. This commit comes with `zstdchunked` pkg that support zstd compression for eStargz (a.k.a. zstd:chunked), based on the above extensibility. `zstdchunked` pkg contains `zstdchunked.Decompressor` and `zstdchunked.Compressor` that allows `estargz` pkg to use zstd compression (i.e. zstd:chunked) instead of gzip. Layer converter and filesystem now support zstd:chunked leveraging `zstdchunked` pkg. `ctr-remote image optimize` and `ctr-remote image convert` support `--zstdchunked` option that omits zstd-based eStargz and filesystem supports zstd-based eStargz layers by default. Signed-off-by: Kohei Tokunaga <[email protected]>
…zstd:chunked) This is the subset of containerd#281. Initially, eStargz is based on gzip compression. But, through zstd:chunked work, it turned out that eStargz is not limited to gzip compression and the same chunking & verifying & prefetching method can be applied to other compression algorithms as well (e.g. zstd). This commit makes `estargz` pkg configurable and agnostic about compression algorithms. For supporting non-gzip compression, the user must implement `estargz.Decompressor` and `estargz.Compressor` interfaces and must plug them to `estargz` tools (e.g. `estargz.Open` and `estargz.NewWriterWithCompression`). `estargz` also provides test suite that is usable for testing these non-gzip eStargz implementations. This commit comes with `zstdchunked` pkg that support zstd compression for eStargz (a.k.a. zstd:chunked), based on the above extensibility. `zstdchunked` pkg contains `zstdchunked.Decompressor` and `zstdchunked.Compressor` that allows `estargz` pkg to use zstd compression (i.e. zstd:chunked) instead of gzip. Layer converter and filesystem now support zstd:chunked leveraging `zstdchunked` pkg. `ctr-remote image optimize` and `ctr-remote image convert` support `--zstdchunked` option that omits zstd-based eStargz and filesystem supports zstd-based eStargz layers by default. Signed-off-by: Kohei Tokunaga <[email protected]>
This PR contains the following:
Zstd:chunked is a variant of zstd that enables extracting each file separately. The structure based on stargz and its verification logic is based on eStargz. Currently, this is enabled by directly patching
estargz
lib for supporting that compression algorithm (zstd) and that footer format. Maybe we should makeestargz
lib configurable against compression algorithms and separate zstd:chunked patches into an indipendent package."Additional layer store" is a proposed functionality for https://github.com/containers/storage to provide remotely mounted layers to the runtime. Currently, this is implemented as a thin wrapper of our
fs
package. Instead of implementing snapshotter API, this directly exposes layers on the filesystem. This seems a bit out of scope as a non-core subproject of containerd. So this should be separated to another project, maybe?The following command mounts the store at the
<mountpoint>
:This store exposes the following structure required as an additional layer store:
There are also other APIs for debugging:
HelloBench result of Podman + {eStargz, zstd:chunked} on GitHub Actions (
Standard_DS2_v2
instance ateastus2
):https://github.com/ktock/stargz-snapshotter/actions/runs/623653929
I'll work on experiment on a richer instance with larger number of samples.