Skip to content

Instantly share code, notes, and snippets.

@BhanukaUOM
Last active August 3, 2020 17:01
Show Gist options
  • Save BhanukaUOM/a6e4e05806786f8d13d478c5890d1c83 to your computer and use it in GitHub Desktop.
Save BhanukaUOM/a6e4e05806786f8d13d478c5890d1c83 to your computer and use it in GitHub Desktop.
Limit WSL2 Resource Usage
[wsl2]
memory=1GB
processors=4
swap=2GB
localhostForwarding=true
@BhanukaUOM
Copy link
Author

BhanukaUOM commented Aug 3, 2020

Workaround:

  • Create a %UserProfile%\.wslconfig file in Windows and use it to limit resource assigned to WSL2 VM.

Supported settings are documented here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment