WSL: Upgrading from WSL1 to WSL2 causes Vmmem to consume huge amounts of RAM hanging the machine
Please fill out the below information:
-
Your Windows build number: (Type
verat a Windows Command Prompt) Microsoft Windows [Version 10.0.19013.1122] -
What you’re doing and what’s happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.) Step 1: Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform Step 2: wsl --set-version Ubuntu 2
-
What’s wrong / what should be happening instead: The RAM usage by the process Vmmem continues to increase during the upgrade process and uses up the entirety of the Physical RAM causing the machine to hang.
This issue is similar to #4159 which is said to be a duplicate of #4166, which mentions that the bug was rectified in 19013. But not sure why it’s still happening.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 27 (3 by maintainers)
I actually am using Docker for Windows and found this https://github.com/docker/for-win/issues/2052 on their bug tracker, maybe related, maybe not 😦.
It does free the memory if I invoke:
Insider build
19631There is no vm running and no WSL running. So who is using that much memory ?
Also, is there no way to restart vmmem or do something to release this memory than computer restart ? I feel we are back in 1998 😃
Tried all options presented by this amazing person who created the article https://shauncassells.wordpress.com/2020/02/22/resolved-excessive-persistent-vmmem-cpu-utilization/
Still, only restart does something useful.
I just wanted to chime in with my experience
I had this exact issue when upgrading from WSL 1–>2 Vmmem used up all remaining ram on my machhine (~30 GB)
I left my computer running over night and miraculously the process finished by morning
Now WSL2 is installed and running fine as far as I can tell
So I’d recommend to anybody with this issue to give the process a good ~10 hours