How to limit Memory usage on VMMemWSL Process

What is VMMemWSL

VMMemWSL is a process representing memory usage by WSL2 (Default is 2-4GB) + If you have installed Docker Desktop, it consumes more memory.

Step

  • Stop Docker Desktop
  • Shut Down wsl
wsl --shutdown
  • Locate Your .wslconfig File in %UserProfile% (user profile folder), If it does not exist, don't worry, create it
  • Update memory as you want
[wsl2]
memory=4GB
  • Test with docker / wsl and monitor memory usage

Discover more from naiwaen@DebuggingSoft

Subscribe to get the latest posts sent to your email.