-
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
HyperKit high cpu consumption #2582
Comments
I'm getting the same thing, and it looks like this has been a problem for a long time, all the way back to #82 or so. If we can't fix this we can't have devs running docker. We will have to switch away from using docker for development and just use manually run our processes (which does not, of course, have this issue). |
I have had good luck simply brute-forcing around this issue. I installed cputhrottle http://www.willnolan.com/cputhrottle/cputhrottle.html and run a bash script whenever I restart docker to locate the hyperkit process pid and throttle it to 60%[on a 4 core system]. I have not had any issues with files being synced and performance is now decent. I lack the time and energy to dig into yet another new framework to figure out why this is happening, cputhrottle made all our dev systems usable and I moved on. My guess is that the stupid thing is using a huge number of file watches, by default it will scan every single hard drive and when a lot of changes happen at once, it will happily grab every single cpu just to determine that "nope, none of those files are of interest to me" |
It's related to heavy I/O of rails app. If you mount the whole app directory inside a container, it will spend a considerable time on sync. I've mounted rails temp/cache directories to tmpfs in compose file and also heavily use cached or delegated mount modes to bring app speed back on earth levels. |
@artyfarty does even :delegated work? I think, that docker team hasn't made an implementation yet so :delegated is an alias for :cached right now ... |
@barat i dunno. I believe in it :( |
@gamort Thanks for the suggestion; I tried that and it worked, but of course Docker was very very slow. At the end of the day, changing the mount options in |
Unfortunately, in Mac OS I haven't tried yet but probably there is the solution: http://docker-sync.io/
|
docker-sync has it's own reliability issues on large projects. |
@artyfarty Could you possibly share your |
@axsuul turned out tmpfs is unreliable crap too. In the end i've gone to nfs. here is howto that i used: |
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 |
Happens here also, If any other information is needed I can provide. Currently I'm using docker Version 2.0.0.0-mac81 (29211) Docker is currently running with kubernetes pods and system related resources and hyperkit is at about 50% CPU ussage. My mac book pro is 2.6 Ghz i7 16 GB Ram ... Is there any workaround we can do, at least until this is fixed ? When I'm trying to run docker-compose and start 2 containers the CPU jumps at 500% ... and my laptop can't be used anymore. Also most of docker-compose like logs or stop are responding with time out .. so I need to force quite docker to use my laptop again .. |
When I start my Docker Desktop community Version 2.0.0.0-mac78 (28905), I can see this process com.docker.hyperkit will consume more than 100% of CPU, so I solve this by kill all my containers and start again one by one. |
When I run jenkins with docker, the hyperkit takes up more than 300% of the cpu. But when I run other services, everything works fine. I even heard the sound of the fan.
|
After 5 months I have finally resolved this pain for me. I have used http://www.willnolan.com/cputhrottle/cputhrottle.html and run command: sudo ./cputhrottle 4634 50 |
My docker for mac (version 18.09.1 Edge) takes a constant 50-80% CPU even when all containers are deleted and |
@michaelbutler try to run
Maybe some volumes still exists and doing sync. |
I was able to solve it by raising the available memory for the Docker daemon from the default 2GB. You can change the available memory in Preferences > Advanced. |
I've had great success with delegated volumes 👍My fan still comes on but it's at least 10x better |
@michaelbutler do you have the local Kubernetes cluster enabled via Docker for Mac? Once I enable it I have constant CPU of 50% |
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. |
I have the same issue docker takes over 140% in a laravel API with client frontend running in the same container, I read somewhere that if you increase the number of files that mac can open at the same time to millions then it should decrease the problem and it happened that way, but I can't find the command anymore, and I don't believe that is the right way to do it, does anyone has a better way of dealing with this? |
hey @alexbaumgertner thank you that worked! |
Wayback Machine link for that blog post above: https://web.archive.org/web/20161223195250/https://blog.dekstroza.io/ulimit-shenanigans-on-osx-el-capitan/ |
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
To have cpu level pretty same for dockerized app and not
Actual behavior
When rails app handles request level of cpu increases to 150-280% depends on how heavy page is, after few seconds it returns to normal level, instead of #2503 and similar where cpu level is permanently high
Information
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: