-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Use pzstd to compress the Docker in SWI slim images #21852
Conversation
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
LGTM
Cherry-pick PR to 202405: #21869 |
Why I did it Enabled the docker inram feature for slim image. It would extract the docker image to ram during the boot, so it would take extra times during boot. Work item tracking Microsoft ADO (number only): 31323281 How I did it Use pzstd which is more efficient tool to compress and decompress the docker file to reduce the boot time. Currently, we do not modify the "FILESYSTEM_DOCKERFS=dockerfs.tar.gz" in onie-image.conf, so for slim image, we still use dockerfs.tar.gz as file name but actually with zstd compressed. We tried to find out a way to adjust the file name in onie-image.conf, but it seems not easy to do that. So we use the file cmd to determine the compressing type in union-mount.j2, then use the related cmd to extract the docker file. Plan to support zstd for all types of images in the future to unify the docker file image . How to verify it Boot swi slim image and normal image, boot mellanox bin image, all boot successfully.
Why I did it Enabled the docker inram feature for slim image. It would extract the docker image to ram during the boot, so it would take extra times during boot. Work item tracking Microsoft ADO (number only): 31323281 How I did it Use pzstd which is more efficient tool to compress and decompress the docker file to reduce the boot time. Currently, we do not modify the "FILESYSTEM_DOCKERFS=dockerfs.tar.gz" in onie-image.conf, so for slim image, we still use dockerfs.tar.gz as file name but actually with zstd compressed. We tried to find out a way to adjust the file name in onie-image.conf, but it seems not easy to do that. So we use the file cmd to determine the compressing type in union-mount.j2, then use the related cmd to extract the docker file. Plan to support zstd for all types of images in the future to unify the docker file image . How to verify it Boot swi slim image and normal image, boot mellanox bin image, all boot successfully.
@lipxu @StormLiangMS shouldn't this also be cherry picked to 202411? |
Thanks for reminder, @andywongarista , should be in 202411, let me add the label. And I think we should consider to support both zstd and gz for all images in the further. |
Cherry-pick PR to 202411: #22005 |
Why I did it
Same with #21824
Enabled the docker inram feature for slim image.
It would extract the docker image to ram during the boot, so it would take extra times during boot.
Work item tracking
31323281
How I did it
Use pzstd which is more efficient tool to compress and decompress the docker file to reduce the boot time.
Currently, we do not modify the "FILESYSTEM_DOCKERFS=dockerfs.tar.gz" in onie-image.conf, so for slim image, we still use dockerfs.tar.gz as file name but actually with zstd compressed.
We tried to find out a way to adjust the file name in onie-image.conf, but it seems not easy to do that.
So we use the file cmd to determine the compressing type in union-mount.j2, then use the related cmd to extract the docker file.
Plan to support zstd for all types of images in the future to unify the docker file image .
How to verify it
Boot swi slim image and normal image, boot mellanox bin image, all boot successfully.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)