Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WSL Memory Cap - Limit CPU/Memory When using Docker
# turn off all wsl instances such as docker-desktop
wsl --shutdownnotepad "$env:USERPROFILE/.wslconfig"
memory=3GB # Limits VM memory in WSL 2 up to 3GB
processors=4 # Makes the WSL 2 VM use two virtual processors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment