Skip to content

Instantly share code, notes, and snippets.

@Flouse
Created May 3, 2021 03:02
Show Gist options
  • Save Flouse/2e9437fc6a8cb177244590c101d8b509 to your computer and use it in GitHub Desktop.
Save Flouse/2e9437fc6a8cb177244590c101d8b509 to your computer and use it in GitHub Desktop.
WSL2 Tips: Limit CPU/Memory When using Docker
[wsl2]
memory=3GB # Limits VM memory in WSL 2 up to 3GB
#localhostForwarding=true
processors=3 # How many processors to assign to the WSL2 VM.
swap=2GB # How much swap space to add to the WSL2 VM. 0 for no swap file.
# see also:
# https://itnext.io/wsl2-tips-limit-cpu-memory-when-using-docker-c022535faf6f
# https://blog.simonpeterdebbarma.com/2020-04-memory-and-wsl/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment