.wslconfig not applied for WSL2

In the wsl2 docs it is said that wsl can be configured with %USERPROFILE%/.wslconfigI created that file and set memory limit to 2Gb. But after running wsl --shutdown and then starting ubuntu in wsl again and running a couple of processes inside(additonally started docker which is configured to run on wsl2 and which creates additional 2 instances in wsl) it I see in Task manager that Vmmem process is taking much more than 2GB. I'm running on win10 home edition, version 20H2

What did I do wrong? Are there some pitfalls in this process

EDITChecked on Windows 10 Pro - works. Doesn't work on Home edition

6

2 Answers

The problem was that I misspelled measure of magnitude for memory: instead of GB I wrote Gb. This is important for wslconfig

I've had the same problem of WSL not respecting the memory limits set in .wslconfig.

It turns out, the WSL is sensitive to BOM in the config file. I saved it as UTF-8 without BOM and it started working.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like