Scenario:
You're running Windows and Docker with WSL2 (Windows Subsystem for Linux 2) is running in the background.
Task manager shows Vmmem using insane amounts of memory.
Solution:
- Shutdown WSL in command prompt:
wsl --shutdown
- Open Notepad or preferred text editor
- Paste in this:
[wsl2]
memory=2GB - Save as: "%UserProfile%\.wslconfig"
- Open Docker and answer yes to restarting WSL2.
This will still consume the entire 2GB regardless of Linux memory usage, but at least it'll stop growing more than that.
Adjust the 2GB as required.
Supported settings are documented here.
Comments
0 comments
Please sign in to leave a comment.