docker on wsl2 very slow

This comes from the “vmmem” which consumes as much resource as it can.
To solve the problem just go to your user file
for me in

C:\Users\userName

In this directory create a file named “.wslconfig” in which you will configure how many resources can consume WSL2:

[wsl2] 
memory=900MB    #Limits VM memory in WSL 2 to 900MB 
processors=1    #Makes the WSL 2 VM use one virtual processors

Now close your docker and wait for “vmmem” to close in the task manager.

then You can restart docker and normally “vmmem” will not exceed the limit you have set (here 900MB)
If don’t work restart your computer.

I hope it helped you.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)