Windows Server Insider Preview builds have brought an exciting change to the Windows Server Core Container base image that we’d like to share with you. The Server Core Insider container base image download size is over 40% smaller than the 1903 base image, and container startup into Windows PowerShell is 30% faster!
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.
For performance benefits, Server Core containers have always included a set of .NET pre-compiled native images generated by the Native Image Generator tool (Ngen.exe) to improve startup performance. Starting with our Insider images, the Server Core base image will include a much smaller set of NGEN images.
A larger set is included in .NET Framework runtime images (which are based on Windows Server Core), however, the .NET Framework runtime images are also much smaller because we can now ensure that there is only one copy of each NGEN image. Additionally, The NGEN images in the .NET Framework runtime image are now more intentionally selected to target ASP.NET and PowerShell performance. Tests have shown that container startup into Windows PowerShell has improved by 45% when using the Insider-based .NET Framework runtime image compared to the 1903 .NET Framework image.
How exactly have the sizes changed over time? Depends on what you measure sizes. Using the .NET team's method for retrieving Docker Image Sizes, here is how the latest Insider image compares to the first generally available 1903 image, released in May 2019:
|Download Size (GB)||1.92||1.13||-41%|
|Size on Disk (GB)||4.63||2.63||-43%|
Note that running docker pull on the latest Insider image at the time of writing (Insider Build 19023) will display a download size of 1.22. This is because Docker's method for calculating differs slightly from the method linked above.
Image sizes fluctuate month-to-month as they receive monthly servicing updates. The results of the metrics referenced in this and other related blogs will fluctuate accordingly. Note that the size of 1903 used as a benchmark in the related blogs below are based on a a more recent version of 1903, one that has been serviced with several monthly patches that each cause size increases.
Two things to keep in mind:
Note that while tests show that container startup into Windows PowerShell is 30% faster when using the Insider Server Core image when compared to 1903, Windows PowerShell startup within a running container is 100ms (15%) slower for the Insider image and 20ms (15%) slower on the Insider-based .NET Framework runtime image, when compared to their respective 1903 equivalents.
We’d love for you to test out the smaller Server Core image today on windows/servercore/insider and give us your feedback! Also, remember to check out the .NET blog and look out for corresponding .NET Framework images when 20H1 Windows Server Core containers are Generally Available.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.