0

I have a fairly large Windows docker image + container (it has MSVS and lots of tools, based on Windows server 2022). It runs quite slowly even on my fast 16-core Threadripper Windows 11 desktop; it seems hugely disk-bound as well as taking over 50GB of disk space (and it eats more, the longer I use it). The host machine has WSL2 and Docker Desktop (with the WSL2 back-end enabled), and Hyper-V is enabled. The container is self-contained; it doesn't bind-mount any volumes from the host.

Looking at Task Manager, the C disk is pinned at 100% active time with very slow response rates; that's never good. Using procmon I see most of the disk accesses are from "vmmem" and "docker-index", and my c:\ProgramData\Docker\windowsfilter dir fills up pretty often. And I never get more than 1 or 2 CPUs worth of compute, even though I've allocated 8 CPUs to the container (probably just because it's so disk-bound).

I've read various things about how to speed up docker containers on Windows, but since I'm not 100% clear on the underlying architecture (is dockerd running in a VM? What about docker-index? The container itself? What's the filesystem driver in the container?) I'm not sure how to go about speeding it up.

Should I remove Docker Desktop and move to "plain" Windows docker as in https://lippertmarkus.com/2021/09/04/containers-without-docker-desktop/? I don't care about the desktop GUI; I only use the CLI anyway (docker build, docker-compose up, etc.).

Should I run Docker from within WSL? Would that even work with a Windows image/container?

Should I get a clean machine and only run the docker image on it?

Any other ideas?

GaryO
  • 5,873
  • 1
  • 36
  • 61
  • How are you allocating the cpus? Does `--isolation=process` work/help? The WSL2 docker isn't involved with running Windows containers. – Matt Feb 14 '23 at 21:34
  • I'm allocating the CPUs in the dockerd config file. It seems to work because when I shell into the container it says it has 8 CPUs. As I said, I suspect my app is just massively disk-bound though. I'm trying uninstalling Docker for Windows and using the docker CLI system instead, following https://lippertmarkus.com/2021/09/04/containers-without-docker-desktop/. Maybe that will help? – GaryO Feb 15 '23 at 15:28

0 Answers0