microsoft / Windows-Containers

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

Faster hyper-v container startup time #478

Open JensNordenbro opened 8 months ago

JensNordenbro commented 8 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 7 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 7 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 4 months ago

@fady-azmy-msft ?

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been open for 90 days with no updates. @Howard-Haiyang-Hao, please provide an update or close this issue.