-
Notifications
You must be signed in to change notification settings - Fork 120
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 CPU usage on host #3539
Comments
Same happening to me, almost zero cpu usage inside containers, but
|
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.
|
Same actual bahavior. Information
I bought new macbook pro recently.
I installed Latest Docker Desktop Community on my new macbook pro.
|
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 |
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 |
Ya'll sure this is a docker problem and not a Kubernetes problem?
Then run |
Actually disabling Kubernetes single-node cluster stopped the ridiculous 100% usage for me. Thanks for the tip! |
Anyone from Docker had a look at this? This is clearly an ongoing major problem. |
com.docker.hyperkit always consumes a lot of cpu ... |
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. |
Same same: macOS Version: 10.14.4 |
Same experience here: Cpu usage: 11% |
+1 |
+1 Docker Desktop 2.1.0.2 com.docker.hyperkit is at 30 ... 50% CPU even with no containers and no images 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. |
On Windows 10 Pro, same Docker Desktop version, I do not see high CPU usage when Kubernetes is enabled. Something's rotten in the state of Mac. |
Same issue. It's utterly annoying and nobody seems to care. If I could, I would just remove this mess called Kubernetes from my system but the IT industry is blindly moving towards it just because someone said it's cool. Waiting 10 - 20 seconds for a page to load in the browser while |
My laptop is burning my legs and eating my entire battery in just over 2 hours because of this. No activity but constant 40-50% CPU usage for com.docker.hyperkit |
I'm seeing the same - but up to 680% of CPU on an i9 MacBook Pro. Battery draining rapidly while Docker is doing stuff, despite being connected to an 80W USB C power supply. Kubernetes is disabled and the bear minimum of macOS directories are listed in Preferences > File Sharing. |
Super high CPU usage here as well, despite nothing significant running inside containers. My Macbook barely charges while Docker is running! |
I've been seeing this as well on a 2019 macbook pro. Constant 5% cpu usage regardless of whether any containers are running. |
Having same issue, is there any update on the issue? |
My CPU is over 100% alot. Nothing running or Kubernetes enabled.... |
I'm seeing a similar issue since enabling Kubernetes (70-90% CPU usage on Macbook Pro 13" 2019 model). This is the output of my
I'm not sure if the CPU% here is the total utilization over all cores, as it adds up to ~17%. |
Same issue here, around 100% CPU usage on the host, but nothing showing on the running containers. Seems to only happen when I'm running containers that have Python processes in them, instead of just postgres/redis services. So perhaps something interesting there. |
Same here, no containers running, but hyperkit CPU usage was around 35-45%. Dropped to around 3% when I disabled local kubernetes cluster. |
I now just disabled docker unless I am actively using it :( |
So here is what I found for my setup. I know some folks are saying no containers etc cause issues. my docker-compose file is using cached for handling the mounted volume. I was getting a very high 500% cpu use. I ran docker stats from command line and it showed around 45% on the php container which made no sense since I was not running anything. So I copied the find chown command it's using and ran it in the container by hand. I increased the cycle checks in the /etc/monit.d/ folder to 300000 and restarted monit program in the container. What I believe is happening is that the docker program is not really translating io back out to mac osx for whatever reason. Any heavy container io activity will spike the cpu like a mad man. I recommend if you have high cpu run top and figure out what is running and verify you expected it to run. Hope this helps someone. my new cpu usage |
Dumped my mac for an XPS w/ubuntu budgie 19.10, problem went away xD |
Right behind ya! 👍 |
It doesn't sound that it's gonna be resolved quite soon... My interim solution to limit that craziness is to manually control the damage. Then i'm using my own VM and install docker in it. |
Same happen here with Macbook Pro 16" - and |
@douglascorrea |
@170 I've tried but didn't worked, moved to use default apache and install postresql via brew in my machine |
Same problem here. Docker engine 19.03.8 |
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 😄 |
Hi -- a quick progress update on the Mac CPU issue: It seems to be a mixture of several bugs including
(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! |
@djs55, Docker Desktop CPU usage dropped from 100+% to less than 5% when containers are (mostly) idle. Nice work. |
I also see a large drop in CPU usage, from 150+% to 10-20%. Thanks! |
@djs55 works for me! CPU usage dropped from 120+% to 10-20%. |
@djs55 Works for me, dropped from 100+% to 8%. Great work and thank you ! |
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. |
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
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 processcom.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.
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.
The text was updated successfully, but these errors were encountered: