microsoft / Windows-Containers

Welcome to our Windows Containers GitHub community! Ask questions, report bugs, and suggest features -- let's work together.
MIT License
391 stars 60 forks source link

Faster hyper-v container startup time #478

Open JensNordenbro opened 4 months ago

JensNordenbro commented 4 months ago

Today on Windows, docker container startup (HyperV-containers) seems to be dependent upon size of docker image. This is not the case in Linux (not noticable at least).

Example on my machines:

docker run -it mcr.microsoft.com/dotnet/sdk:8.0.203-nanoserver-1809 -> ca 4 sec startup

docker run -it mcr.microsoft.com/dotnet/sdk:8.0.203-windowsservercore-ltsc2019 -> ca 15s startup.

This needs to be mitigated !

fady-azmy-msft commented 4 months ago

Hey @jensNordenbro, are these startup times the first container startup times? If not, how long do the n+1 containers take? The first container startup usually takes extra time.

JensNordenbro commented 4 months ago

Running: 1>docker run -it mcr.microsoft.com/dotnet/sdk:8.0.203-nanoserver-1809 cmd.exe /c:exit takes 3 seconds on my machine , similar result all times.

2>docker run -it mcr.microsoft.com/dotnet/sdk:8.0.203-windowsservercore-ltsc2019 cmd.exe /c:exit takes 19s on my machine , similar result all times.

3>docker run -it mcr.microsoft.com/dotnet/sdk:8.0.203-windowsservercore-ltsc2019 cmd.exe /c:exit takes 5s on my machine , similar result all times.

JensNordenbro commented 1 month ago

@fady-azmy-msft ?