Limit Resources for WSL

2022/03/12

The Windows Subsystem for Linux is in many ways a pretty authentic Linux experience. It is also used as a backend for Docker on Windows. However, I have noticed that it consumes quite a lot of resources – in particular memory.

The available resources for WSL for user <user> can be limited by having a file in C:\Users\<user>\.wslconfig with contents like

[wsl2]
memory=2GB
processors=2

Check the full docs for more info.

>> Home