docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.44k stars 119 forks source link

idle Mac CPU and MEM goes full with a strange docker process #3100

Closed Rovel closed 4 years ago

Rovel commented 6 years ago

My new macbook pro started a strage behavior when idle, as I started debugging I found a weird docker command running as it goes idle.

Expected behavior

Sleeping pc

Actual behavior

Full fan and 100% cpu

Information

Diagnostic logs

Docker for Mac: version: 18.03.1-ce-mac65 (dd2831d4b7421cf559a0881cc7a5fdebeb8c2b98)
macOS: version 10.13.6 (build: 17G65)
logs: /tmp/7E46BCBE-1B06-49E9-A70C-6C745CD3A8CB/20180719-150730.tar.gz
[OK]     vpnkit
[OK]     vmnetd
[OK]     dns
[OK]     driver.amd64-linux
[OK]     virtualization VT-X
[OK]     app
[OK]     moby
[OK]     system
[OK]     moby-syslog
[ERROR]  kubernetes

Steps to reproduce the behavior

  1. Leave the machine idle with NO containers running
  2. Come back after a while when you hear the fan full on
  3. go to terminal and run htop, and filter by mem and cpu
  4. look at this strange command:
    com.docker.hyperkit -A -u -F vms/0/hyperkit.pid -c 2 -m 4096M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-vpnkit,path=s50,uuid=a35dfb74-99aa-406d-96cd-70f724d6abf1 -U 25fc85db-a77b-4984-827a-cd5c1a6f0d91 -s 2:0,ahci-hd,file:///Users/$USER/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2?sync=os&buffered=1,format=qcow,qcow-config=discard=true;compact_after_unmaps=262144;keep_erased=262144;runtime_asserts=false -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-for-mac.iso -s 5,ahci-cd,vms/0/config.iso -s 6,virtio-rnd -s 7,virtio-9p,path=s51,tag=port -l com1,autopty=vms/0/tty,log=vms/0/console-ring -f bootrom,/Applications/Docker.app/Contents/Resources/uefi/UEFI.fd,,
begin29 commented 6 years ago

the same issue for me

docker version: 18.03.1-ce-mac65 (24312)
macOS Hight Sierra 10.13.6 (17G65)

mentioned that cpu loading go wild after close lid, laptop goes to sleep, then open it and working with daily issues. Docker process start loading cpu. screenshot

docker-robott commented 6 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d 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

begin29 commented 6 years ago

/lifecycle frozen

VBagmut commented 5 years ago

"Solved" by restricting maximum cpu usage for com.docker.hyperkit to 100% with help of https://github.com/fuyu/AppPolice

Having the same problem with high CPU usage by com.docker.hyperkit - up to 500%. I bought MacBook Pro recently and its terrible to use Docker on Mac for now.

@docker-desktop-robot @begin29 and all docker team - are you going to change hyperkit to other solution or try to talk with apple to make native mac containers like windows containers on windows?

Rovel commented 5 years ago

We did some tests here and after a full delete, including library and cache of docker and re-install to the newest it seems to stop the issue..... oh remember to wipe all the containers too :trollface:

begin29 commented 5 years ago

@Rovel, can accept that issue is not exist after full reinstall, but would be nice to found root of that problem. Not really good practice wipe everything and start from scratch. Will be posted here if will meet the same issue.

Rovel commented 5 years ago

Thanks since most images and volumes are preserved elsewhere, for my specific case solved, I noticed that the latest docker for Mac an Win perform way better than those before, maybe they did some optimisation in the engines and stuff like that, but not sure this issue relates

stephen-turner commented 4 years ago

I'm going to dupe this against the main CPU ticket, #3499. I've just posted a new build there that you can try if you are still having problems.

docker-robott commented 4 years ago

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