Skip to content

Vmmem or vmmemWSL grabs 8 GB in Task Manager and won't release it, even after closing WSL.

WSL2 runs in a lightweight VM and holds memory as cache. By default it releases slowly, but you can cap it and tune behavior via .wslconfig.

Try this first

  1. 1Create %USERPROFILE%\.wslconfig (literally in your home, not in the distro). Open in Notepad.
  2. 2Add a [wsl2] section with memory and processors, for example 'memory=4GB' and 'processors=4'. Tune to your RAM and workload.
  3. 3Optionally 'swap=2GB' and 'localhostForwarding=true'. 'autoMemoryReclaim=gradual' (Windows 11, recent WSL) returns memory automatically.
  4. 4Fully shut down WSL with 'wsl --shutdown' in PowerShell, then 'wsl' to restart. Without shutdown the old config stays loaded.
  5. 5Verify with 'free -m' inside WSL and Task Manager on the Windows side. Vmmem should stay within the cap now.
  6. 6Keep devs informed: a low cap makes large project builds fail with OOM instead of swapping.

When to bring us in

If vmmem keeps growing past the cap or the distro crashes, check the WSL version with 'wsl --version' and update the component. Persistent leaks belong on the upstream issue tracker.

See also

None of the above fits?

Describe your situation below. We pass your input plus the steps you already saw to our AI and return tailored next-step advice. If it's too risky to DIY, we'll say so.

Who are you?

For the AI question we need your email and company, so we can follow up if the AI gets stuck, and to prevent abuse.

Limited to 2 questions per hour and 5 per day, kept lean so the AI stays useful. For more, contacting us directly works better for you and us.

Or skip the DIY entirely

Our Managed IT clients do not look these things up. One point of contact, a fixed monthly price, resolved within working hours.