Open cmd prompt, run as admin,
wsl --shutdown
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have experienced high CPU usage for Vmmem frequently (~every 2days) and the only solution at the moment is simply restart my machine.
It is understood that is related to WSL and I do have a Docker image running on Ubuntu on Windows. However it is not really responding for Ubuntu and Docker (see below) and CPU usage is still that high even I manually close Docker Desktop and run cmd wsl --shutdown.
It's really disruptive for me and any opinion would be appreciated.
Cheers
Steve
Open cmd prompt, run as admin,
wsl --shutdown
Hi All,
I use Docker and WSL2 frequently and have run into this problem many times. It seems to happen semi-randomly after some period of time, ~1-2 days.
I don't have a solution that addresses the core issue with Vmmem but I do have a workaround that doesn't require rebooting my whole machine. For me, going into Task Manager and ending the "Windows Subsystem for Linux" task is sufficient and Vmmem goes back to normal.
Hope this works and saves people from having to restart every time.
Note that this bug seems to have been discussed at https://github.com/microsoft/WSL/issues/6982 for over 2 years already. From there, it looks like pressing Win+Ctrl+Shift+B
could also help, as it resets the graphic (video) driver which apparently causes the issue.
As stated by WFarmer, stopping the Window Subsystem for Linux (wslhost.exe) should work as well. In the linked thread, restarting the Windows service called WslService
could help as well.
Of course, none of this helps with avoiding the issue altogether, unfortunately.
At my level, I noticed that I have Visual Studio open in remote mode to WSL2 + Docker, every time it occurs. Most of the time, it happens just after I wake up my laptop from sleep mode.
If I shut down VS, who is trying to reconnect to the remote wsl session, shutdown docker, then shutdown WSL. Vmmem goes away and I can relaunch everything until the next time I put my laptop in sleep mode.
Thanks for your answer, it's probably fix the symptom by scarifying the performance. However, any idea what is the root cause or how to figure it out? Particularly high cpu with unresponding Ubuntu and no docker running?