-
Notifications
You must be signed in to change notification settings - Fork 118
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
CPU Usage Still High on Docker 3.0.0 #5116
Comments
Now it's worst OS: Catalina 10.15.7 Settings: docker-compose.yml
EDIT: after 10-15 minutes of continuously "burning" CPU usage it seems that com.docker.hyperkit is eating between 8-30% CPU with 3 containers running ( kibana, Elasticsearch, filebeat ) |
@pjjanak @ricristian Can you clarify whether you're also seeing high CPU load when no containers and no Kubernetes are running, or only when there are running containers? Those would likely have different causes. Thanks. |
@stephen-turner I can confirm that by default when all containers are stopped the load is small under 10% EDIT: I've made now more tests and I've discovered following: After those 10-15 minutes everything is downloaded + started cpu decreases to 10% UseCase 2. When I try to start same containers that are already downloaded cpu load increases for few seconds ( under 1 minute ) probably until containers finish loading some settings After those few seconds cpu load decreases again to 10% and stays in 10-30% All the tests were realised using docker compose mention earlier ( 3 containers - es - kibana - filbeat ) Maybe I was to hurry to report this but if we ignore the start-up. time of containers which generates high cpu load this release improves overall cpu usage. |
@ricristian Thanks, that's very interesting. I'm still surprised the images take quite so long to download: are they enormous? |
@stephen-turner it's highly probable that it is caused by my network ... sometimes bandwidth is not that high ... |
@stephen-turner - I noticed this right after docker restarted after update, so no containers were running. I also don't use kubernetes on this machine, so don't have any running on here ever. I will say that things have quieted down a little since reporting, but my usage is still hovering around 70-80% with no containers running. |
I'm seeing the same observation as #5070 (comment) w/3.0.1 on Big Sur, 11.0.1 (20B50) |
I have the same issue, but it only happens when there is a volume bound:
|
After update to 3.0.0 the cpu usage is around 80 % without running any containers. |
Having the same issue, upgraded to v3 and CPU got back to >200% usage. Version 2.3 is the latest version that doesn't have this issue for me. |
HyperKit takes about 200% CPU (no K8s) on 3.0.1 without any containers running – exactly the same as at 2.5.0. |
Yep, it's back, but not all the time as it was on
|
I habe the same problem. ~170% CPU usage without any container running. Version 3.0.1 on macOS 10.15.7 |
Similar issue here. These are the hyper kit process stats: My gut feeling currently is that there's something running aggressively inside the docker created VM (~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw) that is eating up cycles - but this is just a hypothesis at the moment and I've no idea how to test that theory just yet. Diagnostic ID: EDIT: so not sure if something can be tweaked here to see if it's the culprit (assuming my hypothesis of the VM being the issue). That said, it could also be something with HyperKit which could be causing the issues here. EDIT: |
I've just updated to the latest version which is |
Hi, docker-compose.yml
|
Seeing the same with 3.0.3 on macOS 11.1. Just did a complete clean install of Docker Desktop, no containers running at all, and Diagnostic ID: |
Same problem. OSX 11.1 + docker 3.0.3 eats 130% CPU. Diag ID: 22478378-9FD7-4163-ACB5-21C629CD6CCC/20201228181903 |
I suspect this is related to docker/roadmap#12 Also, rolling back to 2.3.0.5 worked for my Big Sur(20C5048l). |
I recently upgraded to 3.0.1 on Mac OS Catalina, and I am seeing hyperkit consume 86-100% of cpu even while there are no containers running ( |
Similar issues here. I upgraded from Catalina/3.0.1 -> Big Sur 11.1/3.0.3 and am seeing hyperkit CPU in constant load again ~30%. Disabling turbo boost seems to be the only method to control this. |
Same here, Docker version 3.0.4 (51218) on Big Sur 11.2 Beta and hyperkit consistently ~206% CPU. |
TLDR: The same issue for me but figured external Docker daemon connection caused the high CPU usage. Experienced the same issue when I upgraded to docker 3.0.4 from 3.0.3. Using macOS Catalina, com.docker.hyperkit was using 150%+ CPU. Stopped everything, restarted, pruned and downgraded to 2.5.1 all didn't help and CPU usage was still around 150%+. I was using IntelliJ with Docker plugin at that time with IntelliJ connected to Docker daemon (was connected during the upgrade as well) I assumed external connection caused the high CPU. Restarted IntelliJ and no issue after that. You can easily reproduce this by running Docker through JetBrains products and have it attached during the restart or upgrade. The CPU usage will sit at around ~50-175%. |
The worst part of this is that if I forget to quit Docker for Mac, and I walk away from my laptop, I'll come back to a laptop with 7% battery, even when it's plugged in the whole time. |
This. When restarting Docker for Mac (e.g. due to an update) a previously opened Docker-Service connection from IntelliJ (here: PHPStorm) tried to reconnect instantly, causing high cpu loads on hyperkit. Stopping the Docker-Service Plugin in PHPStorm stopped the cpu spike and everything went back to normal cpu load. |
Indeed, this was my issue as well! Disconnecting and reconnecting the Docker plugins in WebStorm does the trick, and brings they hyperkit process to a much more reasonable <10%. Good find! |
@hikerspath and @diurnalist can you explain what it means to "allow full disk access to Docker". Are you talking about the configuration dials on this config? https://docs.docker.com/docker-for-mac/space/ Edit: Sadly, did nothing for me. I'm running Kubernetes. Before "Allow Full Disk", was around 100% CPU Usage. Same for now. At least the fan does not turn on anymore at 100%, rather than the 500% it was before 3.0 upgrade. |
@kamok they mean this setting in the MacOS System Preferences: full-disk-access-Apple.Devices.HD.Most.Compatible.mp4 |
I have this issue after upgrading to Big Sur with > 200% CPU without any container running, resetting to default seemed to do the trick for me. |
Another one with >200% CPU without running containers. This is unacceptable as a production release. |
I have had this issue for months, I had to restart the containers at least 5 times a day. Last week on Tuesday it got even worse: within 10 minutes after restarting containers, the CPU went to >300%. A co-worker also started experiencing this issue that day. We tried suggestions in this and other topics, but nothing seemed to work. Last Thursday, we both increased resources to 6 CPUs, 6GB memory and 2GB swap. Although we did not expect anything from this, we both did not have high CPU usage of com.docker.hyperkit since then. |
Confirmed with 3.5.1.7 in OS X 11.4 (Big Sur). Giving it less CPUs makes the problem somewhat better, but the fan still goes constantly and things heat up. if you give it more cores, it will eat up more CPU. |
Confirmed with MacOS Big Sur 11.4, using Docker Desktop 3.5.1 (66090) - includes Kubernetes v1.21.2 Resources (in Preferences) set to CPUs 8 Memory 24GB Swap 2GB Disk Image 128GB, all file sharing resources removed. the Docker Engine JSON blob looks like:
If I have If I enable Kubernetes, that goes up to 26-27~% idle CPU. It doesn't look like there's any single process that's the culprit of all the extra CPU? it's a combination of lots of components using a little bit? I see a few items at 6-7~% CPU at various times.
I also tried the new Virtualization framework but idle CPU was higher (35-40%), turned that off and didn't test too much further there. |
Kubernetes is known to be a bit wasteful on CPU. We've turned on all the optimizations we can, reduced polling intervals etc., but it's not really designed for desktop use. Other desktop Kube distributions like minikube have the same problem. |
understood thanks @stephen-turner curious, is it possible to tune parameters of the kibe-scheduler and kube-controller-manager on Docker Desktop? to try out ideas to see if they help? eg. suggestions like kubernetes/kubernetes#75565 (comment) |
MacOS: 11.5.1 With no containers running, docker's hyperkit would sit around 7-11% CPU usage. However, I discovered after enabling the experimental Big Sur new virtualisation framework feature that this process has disappeared, and I think been replaced by a process of the MacOS Virtualisation framework - which with a small postgres container running is only at around 0-3% CPU usage 🎉 Would appreciate someone with greater knowhow to confirm this second process is the replacement of the first, but this is a huge win! |
Docker Desktop 3.6.0 - 200% cpu (2 cores a 100%) idle without starting any containers (on resetted to factory defaults) |
My Docker Desktop 3.6.0 |
I'm seeing the same behavior with 3.6.0—above 200% CPU use with no containers running. This is far more than I had with the 3.5.x series in the same state. I tried granting full disk access per earlier in the thread with no improvement. My Diagnostics ID is C6E21428-588F-41DC-9CDF-33AED72834CC/20210826152010 if it helps. |
not just docker related, but FWIW for whomever might be interested: minikube (v1.22.0-beta.0) w/ the parallels (17.0.1) driver seems to behave a lot better than with hyperkit/virtualbox. about 50% CPU consumption with the cluster & around 6 deployments (compared to 200%+) seems like there's nonetheless substantial hypervisor overhead (CPU usage within the minikube VM is much lower than 50%), but it is easily bearable, and the laptop does not get hot. |
1 year later, this stills not fixed... now not a free product anymore. Won't buy license until this bug is fixed. |
Issues go stale after 90 days 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. |
Not stale, this is still a problem |
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. |
Seems like the issue described in #5044 is persisting even after the latest upgrade. I have removed unneeded shares (as mentioned in #3499) but that has not fixed the problem.
Expected behavior
com.docker.hyperkit takes up a normal amount of CPU
Actual behavior
com.docker.hyperkit is constantly running at > 100% CPU
Information
Please, help us understand the problem. For instance:
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: