3 ms·
For those of you who will be running Docker Desktop on WSL2 - which allows to "transparently" use the "docker" command on your other Linux that runs in WSL2. An
by kesor 7y ago
For those of you who will be running Docker Desktop on WSL2 - which allows to "transparently" use the "docker" command on your other Linux that runs in WSL2. And allows to use your WSL2 "other Linux" filesystem to share volumes with Docker containers! ..
Anyway, you need to know that when this stupid Docker and/or WSL2 VM is taking up all your Windows 10 memory - not all is lost.
Using these two commands, you can force WSL2 to give back the memory it is holding prisoner!
echo 1 | sudo tee /proc/sys/vm/drop_caches
echo 1 | sudo tee /proc/sys/vm/compact_memory
Especially if the one doing the mess is the "VM" of Docker.
Now that Docker Desktop is using WSL2 instead of its own VM, you can't see the bastard in Hyper-V console at all... apparently the whole WSL2 VM is not seen in Hyper-V console, even though it IS a damn VM. But it does appear in Task Manager as "Vmmem" and taking up gigabytes of your memory.