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
Host OS should not be using so much CPU when docker is running.
Actual behavior
I have 6 containers running (posgtgresql, redis, elasticsearch and PHP applicatons). They are basically doing nothing - no data is flowing thru the system and web-application is not getting any requests. The CPU usage on the docker VM, as indicated by top command, is very small (1-3%), but on host OS the process com.docker.hyperkit is consuming up to 70% CPU, causing my machine to produce excess heat and slowing down "everything".
Information
The problem used to be happen since a few months, i can't surely say that it is related to any specific update.
resources allocated to docker: 4vCPU, 3GB RAM, 2GB SWAP
The issue seems to be regarding docker-for-mac VM. If I use VirtualBox to start Linux, allocate same resources and start containers - load on host OS is barely visible, as expected.
No osxfs is used, no files are shared with the host OS.
Reacted by fbucek, Valentin Derksen, Camron Flanders, Todd Reedy, Jan Hacker, Ashish Chandwani, Benjamin Karran, Nishant Neeraj, Phil Dinh, Omkar Pangarkar and 23 more
Same issue, but no container running at all! Happen even after clean reinstall (deleted all everything under ~/Library/Containers). com.docker.hyperkit is running with 18 threads and 240% CPU usage even after docker.app is closed.
old macbook pro(i7) -Docker Community Edition (v 17.12.0-ce-mac55 d62ef8d1b0)
It's OK.
I bought new macbook pro recently.
new macbook pro(i9) - Docker Desktop Community (v 2.0.0.3 (31259) 8858db33c8)
It's not OK.
I installed Latest Docker Desktop Community on my new macbook pro.
Initially, there was a very high CPU load. However, after restarting the docker and using it, the CPU load is not so high.
From a fresh install of Docker Desktop Community, I regularly observe about 4% CPU utilization of com.docker.hyperkit. When I enable K8s I notice a sustained 40-60% CPU utilization. Both figures are without any other non-system or non-k8s containers running.
Due to high CPU usage, we have evaluated other hypervisors. Quick benchmarks showed that hypervisor used by docker is slower (in terms of IO and CPU) than other alternatives, like virtualbox, parallels or vmware. We have switched to docker-machine and minikube with NFS, which resulted in lower CPU usage and much nicer IO (for both local images and shared filesystems). While this solution has more complicated setup than docker-for-mac, it also enables a big performance boost for daily docker usage (especially if combined with parallels/vmware fusion, but even virtualbox seems to be better choice than hyperkit).
Reacted by Linnik, Sébastien Van Eyck, Diederik van der Boor, Mark Eissler, Denis Davydov and Jackson Cooper
Is this problem still being ignored? fluctuating 45-70% cpu usage, when i've got no containers and pods at all (only system containers). Tried this on 2 different macs. And clean installations of Docker for Mac.
Reacted by teolisitza, Nikolai Golub, Samantha Barli (Salley) and johanwannheden
Is this problem still being ignored? fluctuating 45-70% cpu usage, when i've got no containers and pods at all (only system containers). Tried this on 2 different macs. And clean installations of Docker for Mac.
Just switched back to a Mac from Windows and Linux. Was wondering why my fan was screaming for over an hour. Checked the activity monitor to see docker Desktop had my CPU pegged around 140%. Quit Docker and all is nice and quiet now. My rust compilations don't even spin the fan up that much! Considering this was all a fresh install and I hadn't even used Docker yet, and looking at this thread, I'd say the mac version has some serious problems. I'm going to go grab podman and buildah while you sort this out Docker.
@m3talsmith pls report back your findings if you find a decent alternative for running Docker based containers on a Mac! It's been this way since forever 😄
Reacted by Michael Christenson II, meirzaicube, Mark Hansen and Jake Moffatt
Hi -- a quick progress update on the Mac CPU issue: It seems to be a mixture of several bugs including
excessively large queues of events in the filesharing implementation -- there is a proposed fix for this but it's not in any current release build
a clash with osquery over the hyperkit serial console: this is fixed in Edge but not in Stable
a further problem with the hyperkit serial console: there is a proposed fix for this but it's not in any current release build
(and possibly more, since the symptoms are all very similar it means they're hard to tell apart)
There is a development build with all the current known fixes (for 1, 2 and 3): https://desktop-stage.docker.com/mac/edge/47050/Docker.dmg (Edited to make this a notarized build) . If you have a chance to try it, please do and let me know how it goes. Unfortunately the build is signed but not notarized so you will need to open it in finder, right click and click on "Open" to bypass the notarization check. I'm very interested to hear both about any bugs in this build and about any remaining CPU issues. Thanks!
Reacted by anton-kazlouski, Christophe Willemsen and Aro Braman
Reacted by Ozan Pedersen Benn, Erik Stielstra, mac-adamarczuk, Christophe Willemsen, Julien Goux, Lucas Chabert, Aro Braman, Valentin Hutter, Serhii, Nicolas Widart and 2 more
I'm going to dupe this against the main CPU ticket, #3499, so that we can consolidate the conversation in one place. I've just posted a new build there that you can try.
Activity
Housik commentedon Feb 21, 2019
Same happening to me, almost zero cpu usage inside containers, but
com.docker.hyperkitis constantly consuming between 30% to 50% CPU.18.09.210.14.3F3876880-AD64-4811-BC9E-1FF410B98410/20190221112519kammoh commentedon Feb 28, 2019
Same issue, but no container running at all! Happen even after clean reinstall (deleted all everything under ~/Library/Containers). com.docker.hyperkit is running with 18 threads and 240% CPU usage even after docker.app is closed.
18.09.2, build624796210.14.3hemith commentedon Mar 7, 2019
Same actual bahavior.
Information
It's OK.
I bought new macbook pro recently.
It's not OK.
I installed Latest Docker Desktop Community on my new macbook pro.
Initially, there was a very high CPU load. However, after restarting the docker and using it, the CPU load is not so high.
treedy commentedon Apr 11, 2019
From a fresh install of Docker Desktop Community, I regularly observe about 4% CPU utilization of com.docker.hyperkit. When I enable K8s I notice a sustained 40-60% CPU utilization. Both figures are without any other non-system or non-k8s containers running.
macOS Version: 10.14.3
Docker Desktop Community version: 2.0.0.3 (31259), stable
hardware: Intel Core i7 / 2 GHz / 8 cores , 16GB RAM, SSD drive
resources allocated to docker: 4vCPU, 2GB RAM, 1GB SWAP
Kubernetes: v1.10.11
marek-obuchowicz commentedon Apr 15, 2019
Due to high CPU usage, we have evaluated other hypervisors. Quick benchmarks showed that hypervisor used by docker is slower (in terms of IO and CPU) than other alternatives, like virtualbox, parallels or vmware. We have switched to
docker-machineandminikubewith NFS, which resulted in lower CPU usage and much nicer IO (for both local images and shared filesystems). While this solution has more complicated setup than docker-for-mac, it also enables a big performance boost for daily docker usage (especially if combined with parallels/vmware fusion, but even virtualbox seems to be better choice than hyperkit).bgehman commentedon May 30, 2019
Ya'll sure this is a docker problem and not a Kubernetes problem?
Then run
docker statsand see what you can see...eplanet commentedon Jun 4, 2019
Actually disabling Kubernetes single-node cluster stopped the ridiculous 100% usage for me. Thanks for the tip!
ajsharp commentedon Jun 22, 2019
Anyone from Docker had a look at this? This is clearly an ongoing major problem.
cc @mikeparker @akimd
dfang commentedon Aug 1, 2019
com.docker.hyperkit always consumes a lot of cpu ...
dragonfax commentedon Aug 20, 2019
Is this problem still being ignored? fluctuating 45-70% cpu usage, when i've got no containers and pods at all (only system containers). Tried this on 2 different macs. And clean installations of Docker for Mac.
teolisitza commentedon Aug 23, 2019
Same same:
macOS Version: 10.14.4
Docker Desktop Community version: 2.1.0.1, stable
hardware: Intel Core i7 / 2 GHz / 8 cores , 16GB RAM, SSD drive
resources allocated to docker: 8vCPU, 6GB RAM, 1GB SWAP
ashishsc commentedon Aug 26, 2019
Same experience here:
No containers running
OSX 10.14.4
Docker Desktop Community version 2.1.0.1
Hardware: MBP 2019, i7, 6 cores @ 2.6GHz, 32GB RAM
Cpu usage: 11%
vdavari commentedon Aug 30, 2019
+1
FlorinAndrei commentedon Sep 12, 2019
+1
Docker Desktop 2.1.0.2
macOS 10.14.6
com.docker.hyperkit is at 30 ... 50% CPU even with no containers and no images
Kubernetes is running (but, again, no containers have been created)
EDIT: Stopping Kubernetes made the issue disappear - CPU usage is back to normal.
But K should not eat CPU like this even when it's doing nothing. That's not normal.
17 remaining items
170 commentedon Feb 5, 2020
@douglascorrea
Did you do
Reset to factory defaults?It's fixed on my MacBook tentatively.
douglascorrea commentedon Feb 8, 2020
@170 I've tried but didn't worked, moved to use default apache and install postresql via brew in my machine
cabezayunke commentedon Mar 20, 2020
Same problem here.
CPU for docker hyperkit between 40% and 70% with kubernetes enabled. Down to 9% when disabled.
Docker engine 19.03.8
Mac OS 10.15.3
Docker desktop 2.2.0.4
kubernetes 1.15.5
m3talsmith commentedon Jun 10, 2020
Just switched back to a Mac from Windows and Linux. Was wondering why my fan was screaming for over an hour. Checked the activity monitor to see docker Desktop had my CPU pegged around 140%. Quit Docker and all is nice and quiet now. My rust compilations don't even spin the fan up that much! Considering this was all a fresh install and I hadn't even used Docker yet, and looking at this thread, I'd say the mac version has some serious problems. I'm going to go grab podman and buildah while you sort this out Docker.
ozburo commentedon Jun 10, 2020
@m3talsmith pls report back your findings if you find a decent alternative for running Docker based containers on a Mac! It's been this way since forever 😄
djs55 commentedon Jul 30, 2020
Hi -- a quick progress update on the Mac CPU issue: It seems to be a mixture of several bugs including
osqueryover thehyperkitserial console: this is fixed in Edge but not in Stablehyperkitserial console: there is a proposed fix for this but it's not in any current release build(and possibly more, since the symptoms are all very similar it means they're hard to tell apart)
There is a development build with all the current known fixes (for 1, 2 and 3): https://desktop-stage.docker.com/mac/edge/47050/Docker.dmg (Edited to make this a notarized build) . If you have a chance to try it, please do and let me know how it goes. Unfortunately the build is signed but not notarized so you will need to open it in finder, right click and click on "Open" to bypass the notarization check. I'm very interested to hear both about any bugs in this build and about any remaining CPU issues. Thanks!
Sutharsan commentedon Aug 3, 2020
@djs55, Docker Desktop CPU usage dropped from 100+% to less than 5% when containers are (mostly) idle. Nice work.
anton-kazlouski commentedon Aug 5, 2020
@djs55 works for me! CPU usage dropped from 120+% to 10-20%.
Got another minor problem with one volume, but if was easy to fix.
ikwattro commentedon Aug 8, 2020
@djs55 Works for me, dropped from 100+% to 8%. Great work and thank you !
stephen-turner commentedon Aug 21, 2020
I'm going to dupe this against the main CPU ticket, #3499, so that we can consolidate the conversation in one place. I've just posted a new build there that you can try.
docker-robott commentedon Sep 20, 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