-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High idle CPU usage when enabling Kubernetes #3065
Comments
Same issue here. It makes my computer run hot and kills my battery. |
Same here, when I got it first I read some tips about increase the memory for Docker, reduce the number of assigned CPUs and remove unnecessary files sharing and using :cache in VOLUME statement in Dockerfile. It helped for a while but today whike I like to test auto scale and one of the Deployment on Kubernetes did not started while 1 CPU was available, when I am gone 2 CPU again %100 load and going back to 1 CPU is not helping anymore. |
yes, it's an issue for me too, 30 to 40% cpu usage when idle |
may related this issue Hyperkit process on MacOS continuously using approx 50% CPU · Issue #2601 · docker/for-mac |
Yes please fix this!!!! |
Dupe of #2601. |
I'm using Version 2.0.0.0-beta1-mac75 (27117) and I'm sitting at 391% CPU on my mac within seconds of turning on Kubernetes. |
yep. if I reduce the number of cores under Docker->Preferences->Advanced to something like '1', then the overall com.docker.hyperkit CPU utilization goes down proportionally. If I disable Kubernetes local cluster, the CPU utilization pretty much disappears from the Mac Activity Monitor. I think people have to buffer expectations when using k8s on a Mac with Docker. It should be for experimentation and minimal developer activities. Otherwise, use k8s in a real, provisioned environment to save your Mac from burning through CPU and the associated heat it generates. |
I don’t see anywhere near this kind of utilization using minikube though. This is specific to Docker Kuberbetes. |
I see this pretty consistently: |
same issue. Specific to Docker kubernetes. Minikube does not do this. |
I've been experiencing the same issue. Diagnostic ID 898161E2-ACF9-44BC-A5B3-834CE43DC787/20190125224340. |
minikube displays the same issue. Don't be fooled. New fresh install of minikube and it consumes the exact same amount of CPU on idle as Docker Desktop for Mac, but it's not hyperkit that's doing it, it's VirtualBox now. So this is probably normal? Probably not, but at least it's not Docker Desktop for Mac -related. |
Just uploaded Diagnostic ID 9DD81722-B609-495D-BEAF-260964764687/20190326150936 with the same issue. I had initially been assuming that this was just Kubernetes background activity but when I looked at
|
Something inside Kubernetes is using a lot of CPU when it should be idle. Someone more knowledgeable needs to dig inside those containers and see what processes are causing this and if it's normal. I doubt it is, since it happens continuously! |
This happens both in Docker for Mac and in minikube [VMBox]. The most greedy idle CPU consumers inside of VMBox are |
Makes no sense. Unless it's at the VM translation layer.
mar., 9 apr. 2019, 17:31 Yury Smolsky <notifications@github.com> a scris:
… This happens both in Docker for Mac and in minikube [VMBox]. The most
greedy idle CPU consumers inside of VMBox are kubelet and kube-apiserver.
On average they eat 3% CPU each. Which results in 40% CPU utilization in
the host mac.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3065 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACBVXHtHUiWZsaLxbdNvgtIlqqLvAGFNks5vfKQngaJpZM4VHde->
.
|
This problem is not specific to the doc-for-mac only: it's a problem with kubernetes in Minikube on all platforms: kubernetes/minikube#3207 |
ya, i just tried minikube deployment and same cpu utilization for unknown reason. |
@ysmolsky Several people, including myself, have mentioned that switching to minikube resolved the issue for us. High CPU usage in my case meant Activity Monitor showing almost 400% CPU usage for Docker when Kubernetes was enabled. Minikube sitting around 15-20% is reasonable in comparison. |
I tried both, a day apart, the second being minikube and the third day
minikube started exhibiting the same symptoms.
mar., 16 apr. 2019, 18:20 Michael <notifications@github.com> a scris:
… @ysmolsky <https://github.com/ysmolsky> Several people, including myself,
have mentioned that switching to minikube resolved the issue for us. High
CPU usage in my case meant Activity Monitor showing almost 400% CPU usage
for Docker when Kubernetes was enabled. Minikube sitting around 15-20% is
reasonable in comparison.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3065 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACBVXEGxJEJv-pHOiXWSjZ8kWyHBA1GVks5vhepVgaJpZM4VHde->
.
|
Datapoint: after some work in k8s cluster, the CPU load from the idle k8s in docker-for-mac grown further. When only k8s system containers running (no other containers are running): the load went from 30-40% to 60-70%.
After the restart of docker & k8s the idle load goes to 30-40% range. |
Seeing similar here -- 45% or so (MBP high end 2016) I figure I can't sensibly use k8s on macOS as the CPU eating increases heat, but more crucially has a huge impact on battery life over hours. Sure if I deploy an app I expect CPU, but the idle drain less so. That being said it's perhaps a k8s issue. A shame as I'm persuing a education/training environment for 'drop ins' to learn about our tech. Already have k8s helm charts but I need to now use a diff tech for laptop attendees as at a conf battery life is everything. I guess it's dirty composite docker images or compose/stacks |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale I still think this is very much an issue that will hinder K8s adoption - how could I help? |
I'm running MBP 2019 16GB RAM and I've given Docker Desktop for Mac: CPUs: 6 Using screen to jump into the LinuxKit VM I can see etcd eating up the CPU
I've created etcd-io/etcd#11460 |
Same here, after "Enable Kubernetes" and "Apply & Restart" I see a 35-45% idle CPU usage. With Kubernetes disabled it is about 4-5%. docker desktop (mac): 2.2.0.3 (42716) Diagnostic ID: |
I noticed that running minikube/microk8s/k3s are generally significantly more cpu friendly for k8s. |
Same here |
Hey! I made CPU usage test using different drivers for minikube (hyperkit / virtualbox) and compared it with Docker Desktop for Mac (Kubernetes enabled). Conditions:
Results:
As you can see - first two options are almost the same ~ 100% CPU . I guess that's because both ENVs used HyperKit. But for "Minikube with VirtualBox driver" results were much better - CPU usage reduced almost twice. It usually jumps from 30 to 60. Here is sample minikube configuration for Case 3 :
|
I'm going to close this ticket. We are in the middle of a big investigation about Mac CPU usage (see docker/roadmap#12). 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. 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. |
Closed issues are locked after 30 days of inactivity. 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. |
Expected behavior
Low idle CPU usage after enabling Kubernetes.
Actual behavior
High idle CPU usage after enabling Kubernetes (no matter with Kubernetes or Swarm selected as orchestrator).
Information
Diagnostic logs
Steps to reproduce the behavior
Without adding any pods with kubectl and without creating any containers with docker, process
com.docker.hyperkit
starts eating a lot of CPU.Disabling Kubernetes in Preferences solves the problem (
com.docker.hyperkit
returns to the normal idle behaviour with 1-2% CPU consuming).The text was updated successfully, but these errors were encountered: