WSL Causes Massive ammount of memory usage when running with docker, related to #4166
Environment
My Windows build number: [run cmd.exe /c ver]:
'\\wsl$\Ubuntu\home\lav'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
Microsoft Windows [Version 10.0.19042.630]
My Distribution version: [On Debian or Ubuntu run lsb_release -r in WSL] :
Release: 20.04
Whether the issue is on WSL 2 and/or WSL 1: [run cat /proc/version in WSL]
Linux version 4.19.128-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Tue Jun 23 12:58:10 UTC 2020
Steps to reproduce
- start wsl and docker desktop
- run a docker compose and pull up any image
- close the docker desktop from windows
- memory usage still remains
WSL logs:
Expected behavior
After Closing docker, windows should claim the memory back from WSL
Actual behavior
vmmem still uses massive amount of ram
Workaround:
-
in a PowerShell, do
wsl --shutdown -
Docker shows a popup "The WSL 2 backend was shutdown unexpectedly ..." Click "Yes".
-
If you missed the popup, just restart Docker.
/dupe #4166 #6280
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.
Thanks for your report!