Introduction to Vmmem
The Vmmem process is a virtual process synthesized by the system, which is used to represent the memory and CPU resources consumed by the virtual machine. In other words, if you see Vmmem consuming a lot of memory and CPU resources, it means that your virtual machine is consuming a lot of memory and CPU resources. Shut down your virtual machine if you want it to stop.
Specific steps
1. Press the Windows + R keys, enter %UserProfile% and run to enter the user folder
2. Create a new file.wslconfig, and then edit it with Notepad
3. Fill in the following content and save, memory is the upper limit of the system memory, here I limit the maximum to 2GB, you can set it according to your own computer configuration
[wsl2]
memory=2GB
swap=0
localhostForwarding=true
4. Then start the cmd command prompt and enter wsl --shutdown
to close the current subsystem
Solve the problem of excessive memory usage of Vmmem in WSL2