You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hyperkit process on MacOS continuously using approx 50% CPU #2601
Install Docker for Mac (Edge, with Kubernetes enabled)
Check hyperkit CPU usage in Activity Monitor
Reacted by Vinay Anantharaman, Thomas Bouron, Thomas Vogel, Jodok Batlogg, Koba, Ivan Sharov, Alexander Staubo, Alexander Dobriakov, Christoph Berger, Ryan B. and 111 more
Reacted by Adrian Pascu, Ivica Loncar, FeliΞ, Henoc Díaz and Nawaid Shamim
Any updates on this? It's a little bit of a blocker for me to keep this on all the time. It drains my laptop battery when unplugged.
Reacted by Thomas Vogel, Koba, Yossi Mesika, Amin Abbaspour, Eric Greer, Gergely Bräutigam, Marsel Arduanov, Alessandro Madruga Correia, Josh Villbrandt, Eric Berndt and 4 more
This urgently needs to be fixed. It's important to note that while there are many issues about Docker for Mac consuming an insane amount of CPU, those reports seem to be related to actual workloads. But this issues when there are no containers running (other than Kubernetes itself). A simple reset and restart will trigger the problem.
Reacted by Larry West, Peter Kelly, Eddie, Jarred Nicholls, Adam Vigneaux, Gergely Bräutigam, Yan Minari, Marsel Arduanov, feiyuw, tsiq-alberto and 5 more
First, looking at the logs, something is continuously calling Docker's API with requests such as /v1.31/containers/json. I'm going to assume this is the Kubelet. But the Kubelet doesn't log any activity corresponding to the frequency of requests, and neither does kube-controller-manager. apiserver does log a little bit:
It doesn't seem enough to indicate high CPU usage, but the note about rate-limiting is interesting. strace on the API server also shows a continuous stream of activity, though it appears to be binary (gRPC and/or TLS-encrypted), and so I don't know what it is. I do see that the API server has 91 TCP connections open, which seems excessive.
we are aware of this issue and track it internally. The amount of CPU taken varies from system to system and is only present when Kube is enabled. With Kube enabled a couple of fairly chunky containers are running and it is yet unclear if it is these containers taking up the CPU or interactions with HyperKit
I can confirm that this is happening for me too and most of the developers have complained about kubernetes using docker for desktop on their macs causes their computers to get very loud. It happens most frequently when deploying and then begins to quiet down, but it's been over 10 minutes since I used the kubernetes api server, all of the deployed stuff is running without any restarts, and I'm still getting a large amount of cpu used. I get these log lines once a minute from the api server:
I0712 14:28:57.714579 1 controller.go:105] OpenAPI AggregationController: Processing item v1beta1.compose.docker.com
E0712 14:28:57.721750 1 controller.go:111] loading OpenAPI spec for "v1beta1.compose.docker.com" failed with: OpenAPI spec does not exists
I0712 14:28:57.721794 1 controller.go:119] OpenAPI AggregationController: action for item v1beta1.compose.docker.com: Rate Limited Requeue.
I0712 14:28:58.679366 1 controller.go:105] OpenAPI AggregationController: Processing item v1beta2.compose.docker.com
E0712 14:28:58.683655 1 controller.go:111] loading OpenAPI spec for "v1beta2.compose.docker.com" failed with: OpenAPI spec does not exists
I0712 14:28:58.683702 1 controller.go:119] OpenAPI AggregationController: action for item v1beta2.compose.docker.com: Rate Limited Requeue.
Reacted by Jordan Jennings, Larry West, Brian de Alwis and Michael
Any movement on this issue? A fresh install of Docker for Mac on a fresh install of OSX this morning sees CPU usage hovering at 35-50% and Activity Monitor's "Energy Impact" rating for Docker sitting around ~70, which is absurdly high.
Is there anything we users can do to help push this one forward? More data collection maybe, collecting logs or providing profiling output? If there's already a fix that needs tested, is there a way for us to chip in and verify it's working with our setups?
I'm going to close this ticket. As @ebriney says, we are in the middle of a big investigation about Mac CPU usage. However, this specific ticket is an upstream issue in Kubernetes, kubernetes/kubernetes#75565, which we cannot fix in Docker Desktop. Other single-node Kubernetes distributions (minikube, kind, etc.) suffer from the same problem (see #3065 for a long conversation on this). So it needs to be fixed upstream. Sorry that we can't do anything about it here.
Of course, this doesn't affect the other CPU tickets we have open that are within Docker's domain. We are aware of them, accept responsibility for them, and are actively looking at them.
Activity
w4-jungyeol commentedon Mar 27, 2018
I've also seen the memory usage at the top. About 1.85 GB. Not sure if it is normal.
richardthombs commentedon Apr 4, 2018
Still happening on Docker version 18.03.0-ce, build 0520e24
vinayan3 commentedon Apr 26, 2018
Any updates on this? It's a little bit of a blocker for me to keep this on all the time. It drains my laptop battery when unplugged.
anacrolix commentedon Apr 30, 2018
I think it went away when i shut down a container I forgot about.
atombender commentedon May 28, 2018
This urgently needs to be fixed. It's important to note that while there are many issues about Docker for Mac consuming an insane amount of CPU, those reports seem to be related to actual workloads. But this issues when there are no containers running (other than Kubernetes itself). A simple reset and restart will trigger the problem.
atombender commentedon May 28, 2018
Looking at the actual VM, this seems like a typical distribution of CPU usage among the Kubernetes processes:
First, looking at the logs, something is continuously calling Docker's API with requests such as
/v1.31/containers/json. I'm going to assume this is the Kubelet. But the Kubelet doesn't log any activity corresponding to the frequency of requests, and neither does kube-controller-manager.apiserverdoes log a little bit:It doesn't seem enough to indicate high CPU usage, but the note about rate-limiting is interesting.
straceon the API server also shows a continuous stream of activity, though it appears to be binary (gRPC and/or TLS-encrypted), and so I don't know what it is. I do see that the API server has 91 TCP connections open, which seems excessive.tristanpemble commentedon May 29, 2018
from this thread
would like some public tracking of this issue
jsternberg commentedon Jul 12, 2018
I can confirm that this is happening for me too and most of the developers have complained about kubernetes using docker for desktop on their macs causes their computers to get very loud. It happens most frequently when deploying and then begins to quiet down, but it's been over 10 minutes since I used the kubernetes api server, all of the deployed stuff is running without any restarts, and I'm still getting a large amount of cpu used. I get these log lines once a minute from the api server:
IngaFeick commentedon Jul 24, 2018
Same happens to me and pretty much everyone I know who's using Docker for Mac. Strangely it seems to happen mostly when no container is running.
ypresto commentedon Jul 26, 2018
htop in privileged container when Kubernetes is enabled:

disabled:

mitchellnemitz commentedon Aug 27, 2018
Any movement on this issue? A fresh install of Docker for Mac on a fresh install of OSX this morning sees CPU usage hovering at 35-50% and Activity Monitor's "Energy Impact" rating for Docker sitting around ~70, which is absurdly high.
Is there anything we users can do to help push this one forward? More data collection maybe, collecting logs or providing profiling output? If there's already a fix that needs tested, is there a way for us to chip in and verify it's working with our setups?
47 remaining items
rfay commentedon Apr 2, 2020
/remove-lifecycle stale
rfay commentedon Apr 2, 2020
/lifecycle frozen
jsanhc commentedon Jun 17, 2020
/remove-lifecycle stale
jsanhc commentedon Jun 17, 2020
/lifecycle frozen
HarryWeppner commentedon Jun 17, 2020
@jorgesanchezperez this is a very real issue!
dvic commentedon Jun 21, 2020
@jorgesanchezperez I can confirm that this issue is still present, around 50% cpu with no containers, logs of the api server still show the following

edit: I can also confirm that disabling Kubernetes "fixes" the issue
ebriney commentedon Jun 26, 2020
Hi everybody, we are currently actively investigating on that problem but we lack some information and we need your help.
We added spindump in diagnostics in that (not yet released) build: https://desktop-stage.docker.com/mac/edge/46292/Docker.dmg
If you have the chance to got cpu locks in any of our process, can you do a diagnose and put it in: docker/roadmap#12
Thanks.
stephen-turner commentedon Jul 7, 2020
I'm going to close this ticket. As @ebriney says, we are in the middle of a big investigation about Mac CPU usage. However, this specific ticket is an upstream issue in Kubernetes, kubernetes/kubernetes#75565, which we cannot fix in Docker Desktop. Other single-node Kubernetes distributions (minikube, kind, etc.) suffer from the same problem (see #3065 for a long conversation on this). So it needs to be fixed upstream. Sorry that we can't do anything about it here.
Of course, this doesn't affect the other CPU tickets we have open that are within Docker's domain. We are aware of them, accept responsibility for them, and are actively looking at them.
docker-robott commentedon Aug 6, 2020
Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked