Windows 11 – Solving High RAM Usage by vmmemWSL
Problem:
Excessive RAM consumption (sometimes matching Cursor’s usage) by the vmmemWSL
process, even when Docker/MCP tools aren’t actively running any containers.
Root Cause:
Docker Desktop (used by MCP) runs inside WSL2 by default. WSL2 dynamically consumes as much memory as available, unless explicitly limited.
Solution:
You can reduce WSL2’s memory usage by editing your .wslconfig
file.
Disclaimer:
This solution is ideal if you’re not actively developing with Docker.
Limiting RAM can affect container performance, especially for builds, complex services, or databases running inside Docker.
Steps:
-
Open or create this file:
C:\Users\YourUsername\.wslconfig
-
Add the following configuration:
[wsl2] memory=1GB # Limit WSL to 1GB of RAM processors=2 # Limit to 2 CPU cores swap=0 # Disable swap (optional) [experimental] autoMemoryReclaim=true # Enable memory reclaiming (recent builds)
-
Apply the changes:
wsl --shutdown
-
Restart Docker if necessary.
I hope it helps!