Miserable, terrible, no-good performance of Docker Desktop

Discussion in 'Windows Virtual Machine' started by KerryS1, Nov 12, 2022.

  1. KerryS1

    KerryS1 Junior Member

    Messages:
    14
    I'm running Parallels Desktop 18.1.0 on my 3.6 GHz 10-Core Intel Core i9 iMac, with macOS 13.0.1.

    I've tried running Docker Desktop with both Windows 10 and 11 guests.

    Since nested virtualization is required, these guests have been configured to use the Parallels Hypervisor, with both the Adaptive and Nested options checked on. I've used the default number of cores (in this case, 10), and double the suggested RAM (16GB). Docker is using the recommended WSL configuration.

    When I attempt to run anything with Docker Desktop, my guest OS becomes essentially unusable, barely responding to clicks and keyboard input. The macOS Activity Monitor shows the guest OS typically using close to 1000% of available CPU power (each 100% corresponding to full use of one core). This happens even while merely starting or shutting down Docker. I can run the same docker-compose.yml on a Windows laptop, or the macOS version of Docker, without a problem, and with very low CPU usage. For what it's worth, my particular use for Docker here is to run ElasticSearch and Kibana, but I don't think that's particular relevant to the problems I'm having.

    I've tried:
    • Uninstalling and reinstalling Docker.
    • Uninstalling and reinstalling WSL.
    • Resetting Docker.
    • Turning off Docker auto-update (some people have said this causes them problems).
    • Fresh installations of Windows 10 and 11.
    • All of the above in different orders.
    Nothing yet has made Docker anything but an unusable, unresponsive, power hungry, system-debilitating mess.

    Is anyone out there running Docker Deskop in a Windows guest successfully without all of this grief? If so, is there any advise you can give to get this working correctly?
     
  2. KerryS1

    KerryS1 Junior Member

    Messages:
    14
    Note: The above post should say "recommended WSL 2 configuration" (as opposed to using Hyper-V).
     
  3. KerryS1

    KerryS1 Junior Member

    Messages:
    14
    Apparently the complexity of my docker-compose.yml file has something to do with the problems I'm having, but not enough to lead to a solution.

    I thought a simplified set-up was helping a lot. I had very reasonable CPU usage for a while, and my system was running smoothly.

    Unfortunately, then I left to eat dinner. When I came back, I could hear the fan on my Mac blowing away, my guest OS was again pathetically unresponsive, and CPU usage was back to nearly 1000%.

    Perhaps there's a memory leak or a thread leak going on? What's weird is that even after shutting down all of my containers CPU remained very high for a couple of minutes before calming down to around 25%, and even then spiked back up to around 800% now and then. With no containers running and the desktop app closed, I still have all of these processes:

    upload_2022-11-13_18-31-35.png
    ...shown here running at around 0%, but spiking upward in unison now and then.
     
    Luke14 likes this.
  4. KerryS1

    KerryS1 Junior Member

    Messages:
    14
    Another experiment, more horrible Docker Desktop performance.

    I created a brand-new Windows 11 VM, this time using a Windows 11 DVD image rather than the built-in option for creating a Window 11 VM. This way I could customize the hardware settings before installation, with the Parallels Hypervisor and nested virtualization options switched on from the very start.

    Then I went straight to installing Docker Desktop, only installing the perquisite of WSL2 first.

    The first time Docker Desktop opened up, CPU usage shot straight up to nearly 1000%, and it took at least 15 minutes for the application to fully start. I didn't even get as far as running any containers and yet my system was run into the ground.

    I tried to open the Task Manager to see what was going on. It took nearly 10 minutes for the Task Manager to open and display any information. When I could finally see some info, it wasn't Docker processes themselves using up all of the CPU time, but system interrupts and vmmem.
     
  5. KerryS1

    KerryS1 Junior Member

    Messages:
    14
    I'm surprised no one else has chimed in on this thread to either say yes, they have this problem, or no, maybe it's just me.

    After contacting tech support, the Docker problem has been turned over "to our developers to investigate it further on the code level", so who knows how long that will take?

    In the meantime, it turns out VMWare Fusion handles Docker like a champ. No problems at all. I haven't used VMWare for a long time, and I still find some aspects of it a bit clunkier than Parallels (installing Windows 11 for ARM was a real pain -- not that I can run Docker on ARM with either platform), but performance-wise, I have to say, Parallels has some catching up to do. Even aside from Docker issues, I find my VMWare setup much smoother and more responsive than I had before with Parallels.
     
  6. KerryS1

    KerryS1 Junior Member

    Messages:
    14
    Just to follow up... I finally got around the problem I was having with Docker, but the reason the problem went away is mysterious.

    When Parallels tech support was about to give me a callback to set up a remote session, I fired up my Parallels Docker setup to get prepared for that session.

    Wouldn't you know, now there wasn't a problem to demonstrate anymore.

    The tech support guy and I speculated that my installation of VMWare might have fixed something on my macOS host that was messing up nested virtualization, but alas, that's only a guess.
     
  7. BabuM

    BabuM Bit poster

    Messages:
    1
    I have the same exact problem of not being able to run Docker Desktop in my Windows 11 VM inside Parallels. I have a Macbook Pro with an Intel I9 processor, 64GB RAM, 2TB NVMe. My Mac is running on Ventura 13.1, Parallels 18.1.1. Running Windows 11 on it. Until recently, everything was fine. I am a .NET Architect/Developer and so, I need to be on a Windows environment a lot. Recently, I decided to containerize one of my microservices application with docker and that's when all hell started breaking loose. Since I had to change the Hypervisor from Apple to Parallels in order to enable nested virtualization, my life is hell. Docker Desktop stalls. The CPU usage is totally 100%, Windows 11 instance stops responding. Even to shut down my Windows instance, I have to wait like 10 minutes for it to complete the Shutdown process and release the CPU resources.

    Did you find out how your problem got fixed? If I can't get this fixed, I may have to stick with a Windows PC for my work. I spent a lot of money buying my Macbook thinking I get the best of both worlds. I can develop multi-platform applications in .NET and test the iOS, Android, Windows and Mac platforms on one single hardware. Unfortunately, that is not what is happening right now. Sharing any remedy you found for your problem would greatly help me in my misery. Thanks.
     
  8. KerryS1

    KerryS1 Junior Member

    Messages:
    14
    I wish I had a solution. For a short time the problem seemed to go away, but I never knew why for sure, and then it came back again. My best guess is that somewhere along the line I experimented with running Docker using Hypervisor rather than WSL. But that's only a little better, it's still pretty bad.

    I see that your system has an i9 processor too. I think I read something somewhere (I wish I could be more specific) that some i9s had a problem with nested virtualization.

    In the meantime, I built a new physical PC. That works a lot better!
     
  9. Luke14

    Luke14 Bit poster

    Messages:
    1
    Just chiming in to say that I too have the same issue. 2019 MBP, i9, 64GB RAM, 2TB SSD. I tried running docker on a Windows 11 guest with nested virtualization enabled. Docker wouldn't even start and the guest OS became unusable. I'm now trying the same thing on a Windows 10 guest.
     
  10. AnthonyH19

    AnthonyH19 Bit poster

    Messages:
    1
    I was having the same problems, but I think i may have found the cause and the solution. I found posts online that identified a Windows security feature called Control Flow Guard being the culprit. You go to Windows Security and then "Apps and Browser Control", then under "Exploit Protection" click on Exploit Protection Settings. In the Exploit Protection window, select "Program Settings" and click on the "+" button for "Add Program to Customize". This causes a popup to appear where you select "Choose exact file path". A file open dialog window opens and type in "C:\Windows\System32\vmcompute.exe" and click on "Open" button. In the Program Settings dialog window, scroll until "Control flow guard" and if it is turned "On", click on the Override checkbox and turn the setting to "Off". Then click on Apply button to exit the dialog window. Reboot Windows and while starting docker engine is still slow, the cpu is no longer pegged to 100% and the UI is no longer unresponsive.
     

Share This Page