docker / for-mac

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

Docker Desktop reports incorrect VM memory usage #6618

Open DaRosenberg opened 1 year ago

DaRosenberg commented 1 year ago

Expected behavior

VM memory usage reported by the app should at least roughly match the configured memory resource usage.

Actual behavior

VM memory usage is incorrect by as much as 9 GB or 37 %.

image

It cannot be explained by looking at the oher Docker-related processes on the machine:

image

Information

macOS Ventura 13.0.1, Intel chip. Docker version 4.14.1.

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

danielrosenberg@Daniels-Mac-Pro data % /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
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?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[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] DD0014: are the backend processes running?
[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[PASS] DD0012: is the VM networking working?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0019: is the com.docker.vmnetd process responding?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[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?
No fatal errors detected.

Steps to reproduce the behavior

N/A

cmditch commented 1 year ago

Seeing similar problems on our end as well. "VM CPU Usage" seems to give meaningful numbers, but "VM Memory Usage" doesn't make sense.

When I start Docker Desktop it immediately says "VM Memory Usage" is 16GB, which is the max allocation set in the resources settings.

Hope this helps! Thanks.

docker-robott commented 1 year ago

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

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

/lifecycle stale

yaakovfeldman commented 1 year ago

/remove-lifecycle stale

Same issue: Docker Desktop on macOS Ventura. Settings are 7GB. Activity Monitor says 7.02GB. But status bar of Docker Desktop says 11.17GB.

docker-robot[bot] commented 1 year ago

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

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

/lifecycle stale

shivaraj-bh commented 9 months ago

What I have observed is that “VM Memory usage” displayed at the bottom is = (VM memory + Container memory), as soon as I stop all containers, it matches the number shown in activity monitor.