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 size monitoring #1954

Open
mthalman opened this issue May 27, 2020 · 2 comments
Open

Image size monitoring #1954

mthalman opened this issue May 27, 2020 · 2 comments

Comments

@mthalman
Copy link
Member

Maintaining an appropriate image size has always been a priority for the .NET Docker images. Keeping image size down saves money and push/pull time, especially since it has a multiplying effect when images get built on top of other images.

Currently there is a basic system in place for monitoring image sizes in the nightly branch. There are some gaps in this implementation:

  • Identifying when an update has changed the image size can sometimes be difficult. Right now, the system allows a certain percentage of variance in the actual image size compared to the stored baseline. The system will cause a failure if the image size difference goes beyond that threshold. The problem is that an update may have occurred that changed the image size to be just within the threshold and then a subsequent minor change down the road pushes it past the threshold. In such a scenario, you care more about the initial larger update than the minor but it can be difficult to identify when that change occurred.
  • The system only tracks the total image size. This makes it difficult to identify which layer actually produced an image size change. You need to identify the digest earlier version of the image and compare its layers side by side with the current version of the image.
  • There's not a good way to visualize the historical change in the image size. You'd have to use file history in git to track the different image size values that were contained in the baseline which is rather cumbersome. But that only tracks what the baseline was set to, not the actual image size.

The proposal is to develop a monitoring system that can track the sizes of each layer of the images and store this data in a way that it can be queried and tracked historically.

@mthalman
Copy link
Member Author

We have an existing issue for tracking layer size at dotnet/docker-tools#745

@mthalman
Copy link
Member Author

[Triage]
Benefits of tracking image size:

  • Identify unintended size increase/decrease and what caused it
  • Validate that changes made to decrease image size actually had the impact we expected

@mthalman mthalman moved this from Needs Review to Backlog in .NET Docker Apr 19, 2023
@lbussell lbussell moved this from Backlog to Current Release in .NET Docker Aug 12, 2024
@mthalman mthalman removed their assignment Sep 9, 2024
@lbussell lbussell moved this from Current Release to Post Release in .NET Docker Sep 16, 2024
@lbussell lbussell moved this from Post Release to Current Release in .NET Docker Nov 13, 2024
@lbussell lbussell added this to the .NET 10 Features milestone Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Current Release
Development

No branches or pull requests

3 participants