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

3.3.0 high cpu usage #5567

Closed
3 tasks done
kumarunster opened this issue Apr 12, 2021 · 8 comments
Closed
3 tasks done

3.3.0 high cpu usage #5567

kumarunster opened this issue Apr 12, 2021 · 8 comments

Comments

@kumarunster
Copy link

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: DF430136-020F-4A49-8BD7-B12D769058A8/20210412130752

Expected behavior

com.docker.hyperkit should not consume much cpu on idle docker containers

Actual behavior

com.docker.hyperkit consumes too much cpu, as already reported on previous versions of docker for mac.

here are issue numbers for your reference: #5092, #5044

Bildschirmfoto 2021-04-12 um 15 40 39

Information

  • macOS Version:
    10.15.7 (19H524) Catalina
  Modellname:	MacBook Pro
  Modell-Identifizierung:	MacBookPro16,1
  Prozessortyp:	6-Core Intel Core i7
  Prozessorgeschwindigkeit:	2,6 GHz
  Anzahl der Prozessoren:	1
  Gesamtanzahl der Kerne:	6
  L2-Cache (pro Kern):	256 KB
  L3-Cache:	12 MB
  Hyper-Threading Technologie:	Aktiviert
  Speicher:	32 GB
  • Docker Desktop Version:

3.3.0 (62916)

@stephen-turner
Copy link
Contributor

There are various possible causes of high CPU, but let me tell you the most common and you can see if any of them apply to you:

  1. Running Kubernetes. We have made some optimisations to Kubernetes, but there are upstream problems we can't fix.
  2. Sharing too many files. Unlike on Linux, where all containers have direct access to the file system, on Mac the files have to be shared into the VM that is running the containers, which is an inherently expensive operation. We have some tips in the documentation (https://docs.docker.com/docker-for-mac/#resources) about ways to reduce the load, including sharing only the files/directories you need to (e.g. do NOT share the whole of your home directory, this will almost inevitably lead to high CPU!) and using named volumes instead of bind mounts for things like databases. For certain write-heavy workloads, switching from grpcfuse to osxfs in the preferences may also help.
  3. Using the Docker plugin on JetBrains products. See CPU Usage Still High on Docker 3.0.0 #5116 (comment) (and the remainder of that ticket).

@kumarunster
Copy link
Author

@stephen-turner thanks for the quick response.
in my case:

  1. not running kubernetes locally
  2. yes, I do have mongodb, postgres and redis mounted to local folders, I'll try to migrate to named volume. The hint with osxfs helped to reduce CPU usage by down by half so far. Thank you.
  3. Not using any JetBrains Plugins here.

Will try complete 2.) with named volumes in some time and report again.

@tomaszputon
Copy link

tomaszputon commented Apr 13, 2021

I can confirm, that this is true -> upgraded to 3.3.0 and have same high CPU consumption.

@hsunatkkday
Copy link

I have the same problem on version 3.3.1.
Screen Shot 2021-04-27 at 12 16 49 PM

@Schwad
Copy link

Schwad commented Apr 30, 2021

I'll see if the above guidance helps but I am definitely getting hit with this out of the blue, while just even using my browser. v 3.3.1

@skys215
Copy link

skys215 commented May 13, 2021

Same here using version 3.3.3.

I'm running mysql only. The docker will have high cpu usage sometimes even doing nothing.

I will keep eye on it if there's some occasion that triggers the problem.

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

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.
/lifecycle stale

@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 Oct 10, 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