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)?
Share and learn in the Docker community.
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
CTRL+u to delete the special charcters appeared in the console like: ^[[51;19R[32
top tor other monitoring command to find what process uses the CPU.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.
Those last two items made the difference for me - Docker was sitting on exactly 100% (of one CPU core) the whole time, even surviving quitting and restarting Docker (and after stopping the only running container), but after turning off Use gRPC FUSE... and Send usage statistics itās now down to ~1%.
I had the same problem. The only resolution step required in my case was turning off āgRPC FUSEā. The āSend usage statisticsā does not seem to have a negative effect if left enabled.
Confirmed for me too, gRPC Fuse seemed like the culprit
After two years, this no longer seems to happen.
I still have the problem on my MacBook Pro 2019
Continuing the discussion from macOS high com.docker.hyperkit CPU usage when no containers running:
I removed all unused containers, images and volumes doing
docker ps -a --filter volume=<volume_id>
docker rm -a <container_id>
Make sure to be careful that you donāt need any of the images, contianers, volumes.
Then completely uninstalled Docker desktop from my machine, and downloaded it from the website again. It seems to has resolved the com.docker.hyperkit using 9+ GB RAM no matter what.
The command shows all containers with a matching filter, not just unused containers, but it doesnāt matter if you uninstall Docker Desktop after that. (Or did you just delete the App from the Applications menu?)
There is no -a option for docker rm.