docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.85k stars 283 forks source link

Turning off Docker Desktop status window update #13967

Open muratyurdakul75 opened 4 months ago

muratyurdakul75 commented 4 months ago

Description

Hi

Is it possible to turn off the Status window update for containers running on Docker Desktop? Continuous [C:\Windows\system32\cmd.exe /d /s /c ““docker” stats --all --no-trunc --no-stream --format “{{ json .}}””] It calculates status values by running . But most of the time the same 3-4 commands work. And this is an unnecessary effort for the computer. Is there any way to turn this feature off? If necessary, I can already access this value from the command line.

Status commands work even if the screen is off. For example, currently Docker Desktop is completely closed. There is only an icon in the icon tray. But these commands always run. And as seen in the screenshot, the same command was run 4 times. The CMD command runs at intervals of about 5 seconds. It doesn’t work in any other application. Only Docker Desktop is running. It would be great if there is a way to turn this off.

Thank you for your help.

OS : Windows 11 Pro 23H2 CPU : i9-12900H RAM : 16GB SSD : 1TB

Status Status2

Reproduce

No need to rebuild. It always works this way.

Expected behavior

There is no need for the Docker Desktop application to constantly update status information. The Docker application is already running in the system tray. Update the status information while the Container Status screen is open, no problem. However, when the Status screen is not open, there is no need to constantly run the "docker stats" command for this information. Maybe this should be left to user option in the settings page.

docker version

Client:
 Cloud integration: v1.0.35+desktop.11
 Version:           25.0.3
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        4debf41
 Built:             Tue Feb  6 21:13:02 2024
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.28.0 (139021)
 Engine:
  Version:          25.0.3
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.6
  Git commit:       f417435
  Built:            Tue Feb  6 21:14:25 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.28
  GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    25.0.3
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.1-desktop.4
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.24.6-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  debug: Get a shell into any image or container. (Docker Inc.)
    Version:  0.0.24
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.22
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.4
    Path:     C:\Program Files\Docker\cli-plugins\docker-feedback.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.0.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scout: Docker Scout (Docker Inc.)
    Version:  v1.5.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 2
  Running: 1
  Paused: 0
  Stopped: 1
 Images: 2
 Server Version: 25.0.3
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
 Kernel Version: 5.15.146.1-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 20
 Total Memory: 7.623GiB
 Name: docker-desktop
 ID: eb997b7b-f552-4372-a5d9-bb4978fcaccb
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: daemon is not using the default seccomp profile

Diagnostics ID

EAD40AFE-1792-4588-8080-3CE99765EAD0/20240311154733

Additional Info

I think I explained the situation sufficiently in the screenshots.

### Tasks
totoguy commented 4 months ago

Duplicate of #13923 ?

muratyurdakul75 commented 4 months ago

Duplicate of #13923 ?

Yes. We talked about the same problem. So I'm not the only one who noticed this. Thanks.

When Docker runs continuously for a long period of time, such as 2-3, the RAM swelling problem occurs. Maybe one of the reasons for RAM swelling is this unnecessary docker stats command.

steve-madden commented 4 months ago

I also notice that some of the docker stats commands get stuck in a loop and cause CPU utilization to balloon.

image

The "8" in the second column is the CPU% on a 12 core i7, so basically 100% of a core for each process.

totoguy commented 2 months ago

Just an update, turns out the zombie processes (at least in my case) are due to faulty AMD drivers. See here: https://community.amd.com/t5/drivers-software/memory-leak-on-zen4/td-p/662281

So basically Docker Desktop keeps running processes in short intervals (which might not be ideal), but it's not DD's fault that they leave a zombie process afterwards.

steve-madden commented 2 months ago

Hmmm... My laptop is Intel/NVIDIA so no AMD drivers. I'm now seeing the runaway process on docker context. Maybe the issue is in the json formatter.

image