4 ms·
By default WSL2 should only be using 8GB ram or 50%, which ever is lower. As far as I know, the high memory usage of WSL2 is due Linux using as much spare RAM
by NGRhodes 4y ago
By default WSL2 should only be using 8GB ram or 50%, which ever is lower.
As far as I know, the high memory usage of WSL2 is due Linux using as much spare RAM as possible for caching and WSL2 having to allocate memory for this cache. Both Linux and Windows memory ballooning under KVM/QEMU manages dynamically manage memory and work around memory caching.
I suspect the issue with WSL2 allocated memory being quickly consumed by cache could be currently a limitation of the Hyper-V hypervisor or the WSL2 kernel.