'Stopping Vmmem from using RAM
I am using Docker to run some containers on Windows 10, and when I was done I noticed an application named vmmem was using almost all of my ram: ~12GB. According to this it is because of Docker and it said if I closed all docker images and containers it would stop. So I stopped and removed all Docker containers and images by the following batch file:
@echo off
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%i
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi %%i
from: https://gist.github.com/daredude/045910c5a715c02a3d06362830d045b6
so when you type docker container ls -a
& docker image ls -a
they both show nothing. However in Task Manager I still see vmmem using about 4 GB of RAM. What else can I do to stop this? Thanks.
Solution 1:[1]
I found the simplest and easiest way to shut down Vmmem is to go into Windows powershell / cmd and enter: wsl --shutdown
. This shuts it down.
Solution 2:[2]
Create a %UserProfile%\.wslconfig
file, and add the following configuration to it:
[wsl2]
memory=6GB # How much memory to assign to the WSL2 VM.
processors=5 # How many processors to assign to the WSL2 VM.
Then restart WSL2, by running the following command in PowerShell:
Restart-Service LxssManager
Source: https://docs.microsoft.com/en-us/windows/wsl/release-notes#build-18945
Solution 3:[3]
to check out all running distros on your WSL
wsl -l -v
to terminate the ones in use
wsl -t {insert distro}
more here https://blog.simonpeterdebbarma.com/2020-04-memory-and-wsl/
Solution 4:[4]
Try this way
- open start menu -> find 'Hyper-V Manager' just by typing
- stop the virtual machine -> right-click -> turn off (look at the picture)
Solution 5:[5]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Bobi arip |
Solution 2 | College Code |
Solution 3 | Mariano |
Solution 4 | Alexandr Kovalenko |
Solution 5 | Henry Ecker |