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

docker desktop backend high memory usage #13668

Open
phivanloi opened this issue Sep 5, 2023 · 7 comments
Open

docker desktop backend high memory usage #13668

phivanloi opened this issue Sep 5, 2023 · 7 comments

Comments

@phivanloi
Copy link

Description

after run a day. My server is high memory with docker desktop backend.
image

Reproduce

run a day

Expected behavior

fix memory usage

docker version

Client:
 Version:    24.0.5
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.20.2-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.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.20
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.6
    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
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scan.exe
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  0.20.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 75
  Running: 75
  Paused: 0
  Stopped: 0
 Images: 40
 Server Version: 24.0.5
 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: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
 runc version: v1.1.7-0-g860f061
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 5.15.49-linuxkit-pr
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 49.99GiB
 Name: docker-desktop
 ID: f5bb2eae-4487-423b-a8f6-72bc2902c9d6
 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

docker info

Client:
 Version:    24.0.5
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.20.2-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.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.20
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.6
    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
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scan.exe
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  0.20.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 75
  Running: 75
  Paused: 0
  Stopped: 0
 Images: 40
 Server Version: 24.0.5
 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: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
 runc version: v1.1.7-0-g860f061
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 5.15.49-linuxkit-pr
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 49.99GiB
 Name: docker-desktop
 ID: f5bb2eae-4487-423b-a8f6-72bc2902c9d6
 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

Diagnostics ID

7A530F83-53E2-4E08-B9D7-304A1C2DF643

Additional Info

No response

@lorenrh
Copy link
Member

lorenrh commented Sep 5, 2023

Hello, what version of Docker Desktop are you using?

@phivanloi
Copy link
Author

Hello, what version of Docker Desktop are you using?

Dear Lorenrh
image

@mooyg
Copy link

mooyg commented Sep 6, 2023

I have the same issue where it's using up all the memory from my wsl vm
image
the containers don't seem to use any significant ram but just the docker i guess. I tried adding memory constraint in the wsl.conf for docker-desktop inside linux but it didn't work. Can't change all VMs memory limit since I am using wsl for other work too

@phivanloi
Copy link
Author

I have the same issue where it's using up all the memory from my wsl vm image the containers don't seem to use any significant ram but just the docker i guess. I tried adding memory constraint in the wsl.conf for docker-desktop inside linux but it didn't work. Can't change all VMs memory limit since I am using wsl for other work too

about five day i will restart docker desktop to clean high memory usage

@rg9400
Copy link

rg9400 commented Sep 27, 2023

This has been a frustrating issue for me as well. I have 128GB of RAM, and somehow, Docker Desktop + WSL are gobbling up all of it. The actual RAM usage for containers is minimal in comparison (pulling data from Grafana using the Docker plugin). I suspect the 48GB RAM limit I set in my .wslconfig is being used by both Docker Desktop and WSL entirely, and the autoMemoryReclaim is not working.

As others mentioned, I need to restart Docker pretty much every 5 days. I have noticed this issue since the release of 4.19 fwiw (#13393 (comment))

Issue persists in 4.23.0

[wsl2]
memory=48GB # Limits VM memory in WSL2 to 64GB
kernel=C:\\Kernel\\bzImage

[experimental]
autoMemoryReclaim=gradual

image

image

@assassinliujie
Copy link

I'm facing this problem too. I have to reboot to solve this problem

@Smankusors
Copy link

this seems duplicate of #13589 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants