docker / for-mac

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

High CPU in django and celery usage after upgrade to 4.19 #6828

Open daveisfera opened 1 year ago

daveisfera commented 1 year ago

Expected behavior

CPU would be low like before the upgrade

Actual behavior

CPU usage is high and fan is turning on

Information

Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check

[2023-05-03T03:09:03.833286000Z][com.docker.diagnose][I] set path configuration to OnHost
Starting diagnostics

[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[FAIL] DD0017: can a VM be started? vm has not started: vm has not started
[FAIL] DD0016: is the LinuxKit VM running? vm is not running: vm has not started
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0038: is the connection to Docker working?
[FAIL] DD0014: are the backend processes running? 1 error occurred:
    * com.docker.vpnkit is not running

[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[FAIL] DD0009: is the vpnkit API responding? dial unix vpnkit.diag.sock: connect: connection refused
[PASS] DD0010: is the Docker API proxy responding?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[WARN] DD0017: can a VM be started? vm has not started: vm has not started
[WARN] DD0016: is the LinuxKit VM running? vm is not running: vm has not started
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0032: do Docker networks overlap with host IPs?

Please note the following 2 warnings:

1 : The check: can a VM be started?
    Produced the following warning: vm has not started: vm has not started

The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines.

2 : The check: is the LinuxKit VM running?
    Produced the following warning: vm is not running: vm has not started

The Docker engine runs inside a Linux VM. Therefore the VM must be running.

Please investigate the following 1 issue:

1 : The test: can a VM be started?
    Failed with: vm has not started: vm has not started

The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines.

Steps to reproduce the behavior

  1. Run project with django and celery
  2. Observe high CPU
SGrondin commented 1 year ago

I can confirm I'm also seeing extremely high CPU and Disk (read) usage even when no containers are running, reminiscent of having docker-index wasting 200% in the background in previous versions, except that now it's the Virtual Machine Service process (in Activity Monitor) that uses 200% CPU, and unlike docker-index I can't kill Virtual Machine Service.

Diagnostic: 08E1EAB8-EA54-4E20-A209-B33B5E054819/20230510192225

trungutt commented 1 year ago

Hey @SGrondin @daveisfera could you okease give the latest DD (4.21.0) a try to see if the issue still persists?

daveisfera commented 1 year ago

It's not as bad as it was, but the CPU is still higher than I'd expect

daveisfera commented 11 months ago

Appears to have gotten a lot worse with 4.24: F14EC0BF-E65E-45F4-B960-78F5BD1C8BD8/20231023171640

daveisfera commented 10 months ago

Still a thing with 4.26.0 (and it's also locking up - see #7044 ): F14EC0BF-E65E-45F4-B960-78F5BD1C8BD8/20231209005500