Skip to content
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

Reopen: CPU 100% usage with hyperkit - https://github.com/docker/for-mac/issues/3499 #5044

Closed
2 tasks done
ClimberBear opened this issue Nov 4, 2020 · 114 comments

Comments

@ClimberBear
Copy link

After yesterday upgrade, the issue has come back.

I have found the old issue in

#3499

I have uploaded a diagnose package with ID:
14953D49-8102-48BD-8964-94B55CD0862B/20201104094416

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: 14953D49-8102-48BD-8964-94B55CD0862B/20201104094416

Expected behavior

Actual behavior

com.docker.hyperkit runs with 90% CPU forever

Information

Please, help us understand the problem. For instance:

Diagnostic logs

Steps to reproduce the behavior

Simply start docker (in my case, with K8s

@mpospelov
Copy link

mpospelov commented Nov 5, 2020

Same for me but without K8s.
Diagnose package id:
E9676C0A-91A1-4EB8-BF42-D272F79E7CB2/20201105085214

@devsi
Copy link

devsi commented Nov 5, 2020

Same problem, com.docker.hyperkit running at 160% for me causing a huge system slow down on mac os.

Internal containers never rising above 1 or 2% CPU

Always sits above 100%. Issue #4981 also covered this in Docker 2.4.0.0 and has been closed as fixed. Docker 2.5.0.0 is the same, I don't believe this is fixed.

@flowy0
Copy link

flowy0 commented Nov 6, 2020

I have some random cpu spikes while not running any container.
Running Docker without k8s.
Diagnose package ID: 0A196DFC-D280-4195-AD85-F7DB253E0980/20201106040906

@asko
Copy link

asko commented Nov 6, 2020

Same here. So far lowest CPU usage when idling (no containers, no stats, no k8s) been around 25%

@Terminator637
Copy link

I got the same situation. No running containers, but com.docker.hyperkit eats CPU for 30-40% without any visible reason.

@lexsca
Copy link

lexsca commented Nov 7, 2020

i'm seeing similar behavior. i tried restarting docker desktop and disabling k8s, but the oddly high cpu usage persists, even when docker is completely idle and has no containers running. digging a bit deeper:

$ pgrep hyperkit | xargs ps auxww
USER           PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
lscarisbrick 32925  16.7  2.3 12849708 380680   ??  S     4:38PM   2:02.37 com.docker.hyperkit -A -u -F vms/0/hyperkit.pid -c 6 -m 8192M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-vpnkit,path=vpnkit.eth.sock,uuid=7ef1b81a-1715-4393-8ba8-b8f3250ed3f0 -U 974c6ab5-2c3e-47dd-83de-22408da6fcf9 -s 2:0,virtio-blk,/Users/lscarisbrick/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw -s 3,virtio-sock,guest_cid=3,path=vms/0,guest_forwards=2376;1525 -s 4,ahci-cd,/Applications/Docker.app/Contents/Resources/linuxkit/docker-desktop.iso -s 5,virtio-rnd -l com1,null,asl,log=vms/0/console-ring -f bootrom,/Applications/Docker.app/Contents/Resources/uefi/UEFI.fd,,
$ sudo dtruss -fp 32925 2>&1 | head -20
dtrace: system integrity protection is on, some features will not be available

	PID/THRD  SYSCALL(args) 		 = return
dtrace: 4404 dynamic variable drops with non-empty dirty list
32925/0x68db7:  psynch_cvsignal(0x7FEF63825610, 0x414640004146500, 0x4146400)		 = 257 0
32925/0x68db7:  psynch_mutexdrop(0x7FEF63825520, 0x1CA400, 0x1CA400)		 = 0 0
32925/0x68dbe:  psynch_mutexwait(0x7FEF63825520, 0x1CA402, 0x1CA300)		 = 1876995 0
32925/0x68dbe:  psynch_cvsignal(0x102858890, 0x1895410018954200, 0x18953D00)		 = 257 0
32925/0x68db7:  psynch_cvwait(0x102858890, 0x1895410118954200, 0x18953D00)		 = 0 0
32925/0x68db7:  psynch_cvwait(0x102858890, 0x1895420118954300, 0x18954200)		 = -1 316
32925/0x68db7:  psynch_cvsignal(0x7FEF63825610, 0x414650004146600, 0x4146500)		 = 257 0
32925/0x68dbe:  psynch_cvwait(0x7FEF63825610, 0x414650104146600, 0x4146500)		 = 0 0
32925/0x68db7:  psynch_cvwait(0x102858890, 0x1895430118954400, 0x18954200)		 = -1 316
32925/0x68db7:  psynch_cvsignal(0x7FEF63825DF0, 0x1D3A40001D3A500, 0x1D3A400)		 = 257 0
32925/0x68db7:  psynch_mutexdrop(0x7FEF63825D00, 0xCCF00, 0xCCF00)		 = 0 0
32925/0x68e4b:  psynch_mutexwait(0x7FEF63825D00, 0xCCF02, 0xCCE00)		 = 839427 0
32925/0x68db7:  psynch_cvwait(0x102858890, 0x1895440118954500, 0x18954200)		 = -1 316
32925/0x68db7:  psynch_cvsignal(0x7FEF63825610, 0x414660004146700, 0x4146600)		 = 257 0
32925/0x68dbe:  psynch_cvwait(0x7FEF63825610, 0x414660104146700, 0x4146600)		 = 0 0
32925/0x68dbe:  psynch_cvsignal(0x102858890, 0x1895450018954600, 0x18954200)		 = 257 0
32925/0x68db7:  psynch_cvwait(0x102858890, 0x1895450118954600, 0x18954200)		 = 0 0

the psynch_* calls are happening at a rate of about 2,000 per second, which seems to be driving the cpu usage.

@mscrivo
Copy link

mscrivo commented Nov 7, 2020

Same here, CPU usage is double what it was on 2.4 with the same set of containers, and pretty much idle.

@JJJ
Copy link

JJJ commented Nov 8, 2020

Hey friends, hope y'all don't mind me joining in the fun:

jjj-sc-2020-11-08 at 12 45 18@2x

USER   PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
jjj    853 190.1  4.0  6634376 668020   ??  R    11:27AM 133:29.39 com.docker.hyperkit -A -u -F vms/0/hyperkit.pid -c 2 -m 2048M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-vpnkit,path=vpnkit.eth.sock,uuid=158924d1-abfa-4d73-bece-f521ceb13755 -U 92096acb-fe0f-4da3-afe3-0d502b0546af -s 2:0,virtio-blk,/Users/jjj/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw -s 3,virtio-sock,guest_cid=3,path=vms/0,guest_forwards=2376;1525 -s 4,ahci-cd,/Applications/Docker.app/Contents/Resources/linuxkit/docker-desktop.iso -s 5,ahci-cd,vms/0/config.iso -s 6,ahci-cd,/Applications/Docker.app/Contents/Resources/linuxkit/docker.iso -s 7,virtio-rnd -l com1,null,asl,log=vms/0/console-ring -f bootrom,/Applications/Docker.app/Contents/Resources/uefi/UEFI.fd,,

In addition, the related containers (used for local web development) are now painfully slow to respond.

@jasonfutch
Copy link

2.4.0.0 it was using around 360% CPU, after I upgraded to 2.5.0.0 it at least dropped down to around 100% CPU usage. It still way to much for running idle and keeps my fan constantly on.

image

@imarcelolz
Copy link

I'm running here the version 2.5.0.0 and I'm still have issues related to the performance. The cpu temperature goes crazy when I start containers with mounted volumes.
image

@rmoff
Copy link

rmoff commented Nov 10, 2020

For those looks to downgrade, d/l links to previous versions can be found here: https://docs.docker.com/docker-for-mac/release-notes/#docker-desktop-community-2400

@x1c0
Copy link

x1c0 commented Nov 10, 2020

Downgrading to version 2.4 worked for me. from 80-100% cpu now I have 30-40% with same container! the fans are finally quiet!! i was going mad lol

@stephen-turner
Copy link
Contributor

Thank you to the people who have included diagnostics ids in your replies. To everyone else, we cannot investigate without diagnostics so please upload them and paste the id here. Thank you.

@jgillard
Copy link

Just updated to 2.5.0.1 and com.docker.hyperkit is idling around 19% CPU with Kubernetes disabled.
Here's the diagnostic ID: 91138FFB-8878-42AB-A66C-4475CC17EA2E/20201110114606

@asko
Copy link

asko commented Nov 10, 2020

Updated to 2.5.0.1, same as @jgillard: ~19% after docker system prune, without K8s.
Diagnostics ID: 2200E977-2352-4DE6-BB3A-E55079875856/20201110124454
PS: interestingly enough, while diag was running, the CPU went down to 6-8% 🤔

@lingaramo
Copy link

AA99B2C7-27EE-4A8E-9650-1310452BA173/20201110122009

@jasonfutch
Copy link

2.5.0.1 brought it down to ~40% CPU while idle, with k8 disabled.

45CA452F-5560-4DFA-A42C-1A54CB02EA9A/20201110125807

@jasonfutch
Copy link

Here is the logs for 2.5.0.1 with k8 enable.. ~65% CPU

45CA452F-5560-4DFA-A42C-1A54CB02EA9A/20201110130357

@stephenpope
Copy link

stephenpope commented Nov 11, 2020

2.5.0.1 - Upgraded from 2.4
CPU now running about 80% constantly ..
Diag Id: B48FB34F-0FAA-4574-9310-2EC5646C161E/20201111110536

image

image

Installed Docker update at 17:25 yesterday

image


Update

Rebooted and with no containers + no other major programs running - system idles at about 15-20% CPU usage from docker

image

Diag Id: B48FB34F-0FAA-4574-9310-2EC5646C161E/20201111140742

@gramotei
Copy link

Same for me. I was on 2.3.0.x and it was like 6% cpu on my MBP 16 idle. yesterday upgraded to 2.5.0.1 it is 15-25% with no container running ...

Diag ID: E49B79C6-D217-4220-88E8-9A683BEB3983/20201111132021

@kommen
Copy link

kommen commented Nov 11, 2020

com.docker.hyperkit using ~70% cpu while idling: CD5093E3-F562-4CCC-A54B-2ACC293EBBD0/20201111160727

@Jakeii
Copy link

Jakeii commented Nov 11, 2020

I'm getting this as well 10-20% with 0 containers running 58E2BFC7-2ABF-4EAD-9039-D5C6E3E3191E/20201111212414

@danielfoglio
Copy link

I am at about 85-90% with no containers running. 1E90E6ED-F28C-436A-AE5E-6485E84B7EDE/20201111215034

@gramotei
Copy link

gramotei commented Nov 11, 2020

FYI: Downgraded like some other people to 2.4.0.0 and now things back to "normal" 5% with no containers running. MBP 16, 10.15.7

@devsi
Copy link

devsi commented Nov 11, 2020

FYI, 2.5.0.1 has so far solved the issue for me. Containers run at 10%. Will keep an eye on it.

@kellen
Copy link

kellen commented Nov 11, 2020

2.5.0.1 still exhibiting 15-20% cpu usage for me with a single running postgres container.

Diagnostic ID: 58A45276-4B8F-490D-888F-C58FA48962A2/20201111231306

@sandym
Copy link

sandym commented Nov 12, 2020

Same here, 20% with no containers running.

0F242532-14F7-4473-BE3D-C8ECF0B08A4C/20201112035502

@ClimberBear
Copy link
Author

2.5.0.1 didn't solve the problem for me. Same behaviour (80% CPU with nothing running)

@jpdoria
Copy link

jpdoria commented Dec 4, 2020

I have the same issue. Docker is idle, no containers running but still get high CPU usage.

OS: macOS Big Sur (11.0.1)
Docker Version: 2.5.0.1
Diagnostics ID: 55A6F0BA-DD8C-45BF-A965-26567048A383/20201204092457

@retrodude
Copy link

The offcial versions 2.5.0.1, 2.4.0, 2.3.0.4 had very high cpu usage on my system. Only 2.4.2 worked so far.
This new Version 2.5.4 workes for me too!

MacOS 10.14.6, MacBook Pro 3,1 Ghz i7 (4 Cores, 8 Hyperthreads) 16GB
Docker configured Resources: CPU: 6, Memory: 10 GB, Swap 4 GB.

@vilenic
Copy link

vilenic commented Dec 4, 2020

Can definitely confirm that version 2.5.4 works as expected with less than 10% CPU usage while Docker is idling.
MacBookPro16,1
macOS Big Sur (11.0.1)
Docker Version: 2.5.4

@justice47
Copy link

Day with new Docker experimental build -
Average CPU consumption by hyperkit dropped from 50-70% to 27-35%
MacBook Pro 16
macOS Big Sur (11.0.1)
Thank's for your work - this high CPU consumption and constantly blowing off fans was really devastating problem!

@ScottPierce
Copy link

I'm on the latest version and I'm seeing Docker continually using at least 20% of one of my mac laptops CPU cores, even though I have no running containers. It's very annoying. Here is the bug I originally filed. #5102 (comment)

@stephen-turner
Copy link
Contributor

@ScottPierce Please try the experimental build posted at #5044 (comment).

@stephen-turner
Copy link
Contributor

2.5.4 is now released and fixes this bug, so I'll close this ticket. (NB it's not the same build as people posted above, that was a development build).

If you're on the Stable channel, we're planning a release including this later this week.

@stephen-turner
Copy link
Contributor

If there are other CPU problems after this week's releases, then please open a new ticket with new diagnostics. Thanks.

@blimmer
Copy link

blimmer commented Dec 10, 2020

For those subscribed / following along, I just saw that version 3.0.0 was released today and includes the fix for this bug: https://docs.docker.com/docker-for-mac/release-notes/#docker-desktop-community-300

@sharedprophet
Copy link

sharedprophet commented Dec 10, 2020

The release notes there say the kernel was downgraded; was that the fix? From #5044 (comment) I got the impression that there was a fix for the newer kernel. Just curious.

@stephen-turner
Copy link
Contributor

Yes, the kernel was downgraded. We didn't manage to find a fix for the new kernel yet.

@LeviticusMB
Copy link

3.0.0 is amazing! Thanks!

Sure, I'm still seeing 20-30% CPU (with K8S but no pods), but the fan is finally quiet.

@gee-forr
Copy link

Hey team - just chiming in here. Docker now idles at ~6% when not running anything. Thank you so much.

@pozgo
Copy link

pozgo commented Dec 11, 2020

Finally, I can get rid of docker-toolbox :D

@TG-KK
Copy link

TG-KK commented Dec 29, 2020

I'm running 3.0.1(50773) & idle usage is ~10% which is much better than previous versions.

@timony
Copy link

timony commented Jan 8, 2021

2.5.4 is now released and fixes this bug, so I'll close this ticket. (NB it's not the same build as people posted above, that was a development build).

If you're on the Stable channel, we're planning a release including this later this week.

Can you please confirm the 2.5.4 is official build? I cant see it in https://docs.docker.com/docker-for-mac/release-notes/#docker-desktop-community-2501

@stephen-turner
Copy link
Contributor

2.5.4 was an Edge build, and we have since merged the Edge and Stable channels. The first Stable release with the fix was 3.0.0, but that had other problems so I would recommend upgrading to the latest release, 3.0.4.

@timony
Copy link

timony commented Jan 8, 2021

2.5.4 was an Edge build, and we have since merged the Edge and Stable channels. The first Stable release with the fix was 3.0.0, but that had other problems so I would recommend upgrading to the latest release, 3.0.4.

Im glad to confirm after installing 3.0.4 (and Mac restart) my funs calmed down (CPU on 20%)

@stephen-turner
Copy link
Contributor

Great, thanks for the confirmation.

@NixBiks
Copy link

NixBiks commented Jan 13, 2021

I'm on docker 3.0.4, macOS Big Sur 11.1, MacBook Pro 2018. com.docker.hyperkit is killing me with 200% cpu usage when running a uvicorn application (python) with hot reload, as well as a webpack watcher (typescript compiler). It is small applications with not a lot of files to watch so it shouldn't kill it like that. My desktop is not really affected by it (running the same on my desktop)

@betesh-at-data-axle
Copy link

I'm running into the same issue as @mr-bjerre . Strange thing is this started yesterday for no apparent reason -- I didn't upgrade or anything (though since then, I've downgraded to a few different versions with no success).

3A821997-CEC3-46AD-8153-C0332678178C/20210115012149

@docker-robott
Copy link
Collaborator

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

@docker docker locked and limited conversation to collaborators Feb 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests