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
High idle CPU usage when enabling Kubernetes #3065
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.
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.
same issue. Specific to Docker kubernetes. Minikube does not do this.
Version 2.0.0.0-mac81 (29211)
Channel: stable
4271b9e6a8
Engine: 18.09.0
Kubernetes: v1.10.3
I think this is a Kubernetes issue. I am using Rancher on 3 node cluster with a separate master. All machines are 2 vCPU, 8 GB RAM, SSD. There is just one nginx deployment and nothing is accessing it.
Before enabling metrics, it had reserved 15% CPU
After Enabling Metrics its even more.
Hey! I made CPU usage test using different drivers for minikube (hyperkit / virtualbox) and compared it with Docker Desktop for Mac (Kubernetes enabled).
Conditions:
CPU's: 2 (more CPU - more usage in idle, that's general behavior in all tests, 2 is fine for normal debugging)
Memory: 5 GB
Few different containers (LAMP stack) are up and running for about 10 mins (idle)
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 :
# Configure VM resources
minikube config set cpus 2
minikube config set memory 5120
# Set default driver. VirtualBox should be installed first.
minikube config set driver virtualbox
# Start minikube. If other driver was already used - first run "minikube delete"
minikube start
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.
Activity
hori-ryota commentedon Jul 10, 2018
related forum
Docker + Kubernetes: hyperkit CPU - Docker for Mac - Docker Forums
jodawill commentedon Jul 16, 2018
Same issue here. It makes my computer run hot and kills my battery.
mehmetsalgar commentedon Jul 19, 2018
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.
miro-kube commentedon Jul 30, 2018
yes, it's an issue for me too, 30 to 40% cpu usage when idle
Version 18.06.0-ce-mac70, channel stable,
hori-ryota commentedon Jul 31, 2018
may related this issue
Hyperkit process on MacOS continuously using approx 50% CPU · Issue #2601 · docker/for-mac
zwing99 commentedon Aug 4, 2018
Yes please fix this!!!!
atombender commentedon Aug 13, 2018
Dupe of #2601.
mlh758 commentedon Oct 12, 2018
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.
pfriedland commentedon Dec 16, 2018
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.
mlh758 commentedon Dec 16, 2018
I don’t see anywhere near this kind of utilization using minikube though. This is specific to Docker Kuberbetes.
greenkiwi commentedon Dec 17, 2018
I see this pretty consistently:
Version 2.0.0.0-mac81 (29211)
Channel: stable
4271b9e6a8
Engine: 18.09.0
Machine: 0.16.0
Kubernetes: v1.10.3
tvarwig commentedon Jan 7, 2019
same issue. Specific to Docker kubernetes. Minikube does not do this.
Version 2.0.0.0-mac81 (29211)
Channel: stable
4271b9e6a8
Engine: 18.09.0
Kubernetes: v1.10.3
blaircraige commentedon Jan 25, 2019
I've been experiencing the same issue. Diagnostic ID 898161E2-ACF9-44BC-A5B3-834CE43DC787/20190125224340.
14 remaining items
HarryWeppner commentedon Oct 8, 2019
/remove-lifecycle stale
I still think this is very much an issue that will hinder K8s adoption - how could I help?
sovereignstack commentedon Oct 15, 2019
I think this is a Kubernetes issue. I am using Rancher on 3 node cluster with a separate master. All machines are 2 vCPU, 8 GB RAM, SSD. There is just one nginx deployment and nothing is accessing it.

Before enabling metrics, it had reserved 15% CPU
After Enabling Metrics its even more.
tekumara commentedon Dec 17, 2019
I'm running
MBP 2019 16GB RAM
macOS Version: 10.14.6 (18G1012)
Docker for Mac: version... 2.1.0.5 (40693) stable
Kubernetes: v1.14.8
and I've given Docker Desktop for Mac:
CPUs: 6
Memory: 2 GiB
Swap: 1 GiB
Using screen to jump into the LinuxKit VM I can see etcd eating up the CPU
I've created etcd-io/etcd#11460
kevinresol commentedon Mar 12, 2020
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)
kubernetes: v1.15.5
Diagnostic ID:
w/ k8s: 33A2468B-90E9-426A-BB3B-9BA3EC73A242/20200312171855
w/o k8s: 33A2468B-90E9-426A-BB3B-9BA3EC73A242/20200312170959
planetf1 commentedon Mar 13, 2020
I noticed that running minikube/microk8s/k3s are generally significantly more cpu friendly for k8s.
noygal commentedon Mar 15, 2020
Same here
IgorVitol commentedon Apr 14, 2020
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 :
stephen-turner commentedon Jul 7, 2020
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.
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