Docker Community Forums

Share and learn in the Docker community.

macOS high com.docker.hyperkit CPU usage when no containers running

I have a high CPU utilisation for Docker Desktop even when it should be idle - no containers running.

  • What could be the cause?

  • How to make sure Docker / Docker Desktop does not burn the battery even I am not using it (without shutting it down)?

This seems like an error. I would purge it from your system and reinstall it.

Which cpu architecture are you on btw? I have a lot higher cpu usage on my M1 Macbook than on my x86 Mac.

This seems like an error. I would purge it from your system and reinstall it.

This does not help to identify the cause of the problem or get it fixed.

Which cpu architecture are you on btw? I have a lot higher cpu usage on my M1 Macbook than on my x86 Mac.

This is Intel 2018 Macbook Pro.

Looks like I found a option to lower the CPU usage with the Use the new Virtualization framework in the Experimental settings. However, Docker Desktop is still constantly using a large share of CPU (now 25%) even if nothing is running. This time the load is just on Apple’s own process.

I would post screenshots, but this forum does not allow.

For the reference

docker system prune --volumes

Did not help. Zero running containers, or any containers, and Docker is still using CPU on idle.

docker events does not show any events, so nothing should be going on.

Docker still taking CPU even with idling in zero CPU. However, now the CPU usage is down to single digits.

Things I changed

  • Make sure debug: false in Docker Engine config

  • Do not use New Virtualisation framework

  • Prune all existing containers, volumes, etc.

  • In file sharing I removed all other paths but not /Users (not sure if this is going to break docker-compose)

  • Turn off Use gRPC FUSE for file sharing

  • Turn off Send usage statistics

I still do not know what causes the CPU usage.

I have had the same issue for a long time I never found an answer to how to solve it. I need to restart Docker quite often, this is the only thing that helps…

I noticed com.docker.hyperkit was at 600% cpu utilization with Docker Desktop shut down. After starting Docker Desktop it fall back to single digits. Is it normal?

Could it be that you had running containers that Docker was trying to stop all of them at the same time after the Desktop was already closed? How long was it happening after closing Docker Desktop?

I think I closed Docker Desktop App while Docker hypervisor was starting. But I noticed 600% utilization only after several hours as typically have high load during work hours (Scala compiler, IntelliJ IDEA running etc). There was no containers running though.

I can only guess that the virtual machine itself stuck in a state it couldn’t properly start but couldn’t stop either.

Next time it happens try this:

cd ~/Library/Containers/com.docker.docker/Data/vms/0
nc -U console.sock
  • Then press ENTER to get the console prompt.
  • Press CTRL+u to delete the special charcters appeared in the console like: ^[[51;19R[32
  • Run top tor other monitoring command to find what process uses the CPU.
  • The console may continuously shows you error messages or warnings. If there aren’t too many and not relevant, press ENTER and ignore it. If there are too many you probably should deal with it.

You can also try the debug shell:

cd ~/Library/Containers/com.docker.docker/Data
nc -U debug-shell.sock

You can use it similarly to the console except it won’t show you error messages over the prompt. However, some commands works differently here like runc list but you can see the same processes. I think it just sees the resources and processes in the VM.