-
Notifications
You must be signed in to change notification settings - Fork 205
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
Introduce new tarfs mode to Nydus #1147
Conversation
@jiangliu , a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/55999 |
@jiangliu , The CI test is completed, please check result:
Congratulations, your test job passed! |
@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56000 |
@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56001 |
@jiangliu , the title has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56002 |
@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56003 |
@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56004 |
@jiangliu , The CI test is completed, please check result:
Congratulations, your test job passed! |
@jiangliu , The CI test is completed, please check result:
Congratulations, your test job passed! |
@jiangliu , The CI test is completed, please check result:
Congratulations, your test job passed! |
Introduce fake TarfsChunkInfo to provide ChunkInfo TARFS. The TarfsChunkInfo acts as follow: 1) all TARFS chunks are uncompressed, because the tar file is in plaintext. 2) chunk digests of TarfsChunkInfo are all zero, so they are fake. Also add constants and helpers to support 512-bytes block. Signed-off-by: Jiang Liu <[email protected]>
Add method to enable/disable hash value computation for BufReaderInfo. Signed-off-by: Jiang Liu <[email protected]>
@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56559 |
@jiangliu , The CI test is completed, please check result:
Congratulations, your test job passed! |
@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56747 |
When using containerd overlayfs snapshotter to handle OCIv1 images, it works as below: - download compressed blobs from registry - uncompress compressed blobs into tar streams/files - unpack tar streams to directories on local filesystem - mount multiple directories into a container rootfs by overlayfs Here we introduce a new work mode to nydus, called as TARFS, which works as below: - download compressed blobs from registry - uncompress compressed blobs into tar streams/files - build RAFS/EROFS meta blob from tar streams/files - optionally merge multiple RAFS/EROFS meta blobs into one - mount the generated RAFS filesystem by mount.erofs By introducing TARFS mode to RAFS, it helps to avoid generating a bunch of small files by `untar`, which speeds up image preparation and garbage collection. It may also help to reduce levels of overlayfs by merging multiple image layers into one final RAFS filesystem. The TARFS mode of RAFS filesystem has several special behavior, compared to current RAFS, as below: 1) Instead of generating RAFS data blob, it directly use tar files as RAFS data blob. 2) Tar files are uncompressed, so data blobs for TARFS mode are uncompressed. 3) Tar files will also be directly used as local cache files. 4) There's no chunk compression info, chunk digest, TOC etc, generated for TARFS mode. 5) Block size is 512 bytes instead of 4K, because tar files are 512 bytes aligned. Now we have three ways to make of OCIv1 images: Mode TAR-TARFS TARGZ-REF TARGZ-RAFS Generate meta blob? Y Y Y Generate chunk data? N N Y Generate blob.meta? N Y Y Generate data blobs? N Y(for blob.meta) Y Data in data blobs? Not generated blob.meta chunk data & blob.meta Chunk alignment? 512 4096 4096 Chunk dedup? N Y Y Lazy loading? N Y Y Note, RAFS in TARFS mode is designed to be used locally only. In other words, it's a way to implement snapshotter, instead of an image format for sharing. Signed-off-by: Jiang Liu <[email protected]>
A RAFS filesystem in TARFS mode directly use tar files/streams as data blobs. A RAFS filesystem in TARFS mode contains a RAFS meta blob and one or more tar files. There's no blob meta, such as compression info array, chunk digest, TOC etc, in the tar files. So there's no support of lazy loading, chunk dedup, chunk validation etc. So assume that the snapshotter will prepare meta blob and tar files before mounting the RAFS filesystem. Enhance the filecache module to support tar files without lazy-loading, chunk dedup and chunk validation. Signed-off-by: Jiang Liu <[email protected]>
Enhance block device to support block size of 512, in addition to 4096, so we can expose RAFS filesystems in TARFS mode as block device. Signed-off-by: Jiang Liu <[email protected]>
@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/56753 |
@jiangliu , The CI test is completed, please check result:
Congratulations, your test job passed! |
When using containerd overlayfs snapshotter to handle OCIv1 images, it works as below:
Here we introduce a new work mode to nydus, called as TARFS, which works as below:
By introducing TARFS mode to RAFS, it helps to avoid generating a bunch of small files by
untar
, which speeds up image preparation and garbage collection. It may also help to reduce levels of overlayfs by merging multiple image layers into one final RAFS filesystem.The TARFS mode of RAFS filesystem has several special behavior, compared to current RAFS, as below:
Now we have three ways to make of OCIv1 images: