Reducing the size of Windows Server Container Images – Part 1

This post has been republished via RSS; it originally appeared at: Containers articles.

One of the most significant pain points for Windows Server Container customers is the size of the container images. These images have historically been quite large, resulting in long download times and impacting available disk space. We have made improvements to these image sizes over time, but thus far, these improvements haven't materially improved the customer experience. Today, we're happy to report some significant improvements in this area.

 

Over the past few months, we've worked hard to decrease the size of the Windows container base images, resulting in a 40% total size reduction. To achieve these savings, we were required to do a one-time re-baseline of our container images in the January 2023 release, which may result in slightly longer pull times (in certain cases) this month. However, because of these improvements, our January 2023 container image is significantly smaller than its December 2022 predecessor.

 

As indicated by the table below, there will be no delta layer this month, but we expect an additional 60-80% size reduction in the first delta layer set to ship next month compared to the previous initial delta layers. This translates to continued savings as the much smaller delta layer grows month to month (as more binaries are serviced).

 

Container Image

Compressed Image Size in GB

 

Difference

December 2022

January 2023

Base layer size

Delta layer size

Total

Base layer size

Delta layer size

Total

Windows Server 2019 Server Core 

1.74

0.78

2.52

1.54

N/A

1.54

~40% smaller

Windows Server 2022 Server Core 

1.33

0.93

2.26

1.25

N/A

1.25

~45% smaller

Windows Server 2019 Windows 

4.13

2.57

6.70

3.68

N/A

3.68

~45% smaller

Windows Server 2022 Server 

3.06

2.25

5.31

3.13

N/A

3.13

~41% smaller

Note that Windows container base images ship as two layers (except Nano Server Image): a base (RTM) layer and a delta layer containing the latest cumulative update for OS libraries and binaries, which gets overlaid onto the base layer. The delta layer's size grows from month to month depending on the binaries that are updated. Both layers must be pulled when a Windows container base image is pulled on a new host. However, during the re-baseline, we squash both the base and delta layers together to create the new base layer that the subsequent delta layer would reference.

 

We believe this should be a big win for scaling applications in production, CI/CD, and any other workflow that benefits from faster startup or pulls uncached images. The new images are available in MCR (Server Core, Windows, Server). We would love for you to try and help us learn from your feedback!

Also, check out part 2 of this blog when the smaller delta layer ships next month. We will share more details regarding the work that went into achieving this image size reduction.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.