-
Notifications
You must be signed in to change notification settings - Fork 1
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
Optimize "time-to-shell" for Windows containers #5
Comments
Caching inquiries to upstream OCI registries is also important for another reason.
|
This was referenced Jun 12, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With #4, the Windows subsystem gets actually usable. However, it currently has three speed bumps when looking at optimizing the "time-to-shell" 1.
A. Container image inspection
Before launching the container, we need to inspect its image in order to select which WDM host to use (Windows 2016, 2019, or 2022). On certain container images, we observed this can take up to three seconds when using
skopeo inspect
.We need to mitigate that speed bump, for example by caching the output of the
skopeo inspect
call. It will not be too difficult.B. Container image adjustments
Currently,
docker build
is invoked on every invocation. Getting rid if it will save another 0.5 seconds.C. PowerShell slowness
We are asking the community about any guidance on this matter. Does PowerShell really have such a large invocation overhead when compared to the
cmd
shell?With the
cmd
program, it takes around 1.4 to 2.6 seconds to spawn a shell.time racker run --rm --platform=windows/amd64 mcr.microsoft.com/windows/servercore:{ltsc2016,ltsc2019,ltsc2022} -- cmd /C exit
The
powershell
program takes around 3.1 to 4.7 seconds to spawn a shell.time racker run --rm --platform=windows/amd64 mcr.microsoft.com/windows/servercore:{ltsc2016,ltsc2019,ltsc2022} -- powershell -Command exit
Footnotes
The time needed to launch a container and connect your terminal to a shell inside the container. ↩
The text was updated successfully, but these errors were encountered: