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

2.5.0.1 High CPU usage #5092

Closed
2 tasks done
Nuru opened this issue Nov 30, 2020 · 14 comments
Closed
2 tasks done

2.5.0.1 High CPU usage #5092

Nuru opened this issue Nov 30, 2020 · 14 comments

Comments

@Nuru
Copy link

Nuru commented Nov 30, 2020

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: 7DDDF979-417F-442C-B930-719FC131249A/20201130184239

Actual behavior

I have several containers running which mount my home directory into the containers with --volume=$HOME:/local. Running a shell script from a host terminal (that presumably obtained some sort of file lock on the directory) in one of those directories sent Hyperkit into > 300% CPU usage.

Information

  • macOS Version: macOS 10.15.7 (19H15) (Catalina)
  • Use gRPC FUSE for file sharing enabled

My guess is that #5044 is actually several issues in one and this is one of them.

Diagnostic logs

Docker for Mac: 2.5.0.1 (49550)
@Nuru Nuru changed the title 2.5.0.1 High CPU usage with file lock 2.5.0.1 High CPU usage Nov 30, 2020
@stephen-turner
Copy link
Contributor

I guess the question is what the shell script actually does. If it does a lot of file changes, then it wouldn't surprise me that hyperkit gets very busy as everything has to be sync'ed across the VM boundary. But if there's something particular that the shell script is doing that confuses hyperkit, then that's a bug that could be fixed.

@Nuru
Copy link
Author

Nuru commented Dec 1, 2020

@stephen-turner As it turns out, the script had a bug, and it was just running an infinite recursive loop. Should not have been doing anything to the file system, just eating up CPU and memory.

function foo() { foo bar baz; }

@kumarunster
Copy link

similar issue here. After upgrade docker for mac to the version 2.5.0.1 I see relatively high cpu time on com.docker.hypervisor process. It is incredibly how fast the battery is empty. as well it seems to be the cause for running fans on my macbook.

For me it looks as the same issue from 2019, closed few weeks ago: #4981

Containers itself are idle, nearly zero cpu usage, but docker engine is running incredible high amount of cpu.

Bildschirmfoto 2020-12-03 um 18 46 01

PID file analytics:
Analyse von „com.docker.hyperkit“.txt

@stephen-turner
Copy link
Contributor

Could you both try the most recent build pasted in #5044? We discovered a regression in the latest Linux kernel. That build reverts the kernel to an earlier version, and most users say it has solved their CPU problems.

@kumarunster
Copy link

kumarunster commented Dec 3, 2020

@stephen-turner many thanks for the link in #5044 ! seems that the new version reduced the load by half now. will keep one eye on it.

@retrodude
Copy link

retrodude commented Dec 4, 2020

I tried different offcial versions 2.5.0.1, 2.4.0, 2.3.0.4 but with all of them, hyperkit had very high CPU > 600% (without any running containers) on my system.
Luckily I found the Link to Version 2.4.2 in this thread which workes for me! (CPU 8%).

Addendum: the new Version 2.5.4 workes 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.

@n13
Copy link

n13 commented Dec 6, 2020

I tried different offcial versions 2.5.0.1, 2.4.0, 2.3.0.4 but with all of them, hyperkit had very high CPU > 600% (without any running containers) on my system.
Luckily I found the Link to Version 2.4.2 in this thread which workes for me! (CPU 8%).

Addendum: the new Version 2.5.4 workes 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.

Where - on what official page - can this 2.5.4 release be found? I only see up to 2.5.3 on the "edge" releases on the Docker page.

I need to verify it's an actual legitimate build before letting it run wild on my system (I really need VMs running OS X...)

@retrodude

@stephen-turner
Copy link
Contributor

2.5.4 is not released yet. We're expecting to release it later today, but it might not be that exact build.

@n13
Copy link

n13 commented Dec 7, 2020 via email

@stephen-turner
Copy link
Contributor

Yup, 2.5.4 (build 50534) is now released and fixes this bug, so I'll close this ticket.

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

@n13
Copy link

n13 commented Dec 7, 2020

This build dropped CPU of com.docker.hyperkit to 2% with 1 core assigned to Docker (8 core i9)- much better than before, still less than ideal but I guess on par with what it was before. I don't understand why it's using any CPU when no containers are running.

@stephen-turner
Copy link
Contributor

The VM is always running and may use a little bit of CPU.

@Niek
Copy link

Niek commented Dec 9, 2020

I can confirm that upgrading to 2.5.4 fixed high idle CPU for me.

@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 Jan 8, 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

7 participants