I was always under the impression that WSL was good on RAM - giving it back when not needed. There was never a way to tune RAM usage AFAIK.
[wsl2]
memory=8GB
In my .wslconfig. Vmmem thrashes and kills the system every couple weeks, even when I'm not running Docker (which kills it even faster)Wsl2 has a config file setting for ram usage. WSL1 just shares the windows RAM.