Windows vmmem taking up all your RAM memory? Do this


2 min read

When I first ran Docker on my Windows, vmmem takes up about the entire space on my RAM. My Windows machine would just literally freeze up, and I won’t be able to multitask or do anything.

WSL 2 consumes massive amounts of RAM and doesn't return it · Issue #4166 ·  microsoft/WSL · GitHub

If you are also faced with this issue, follow these action steps to get this problem solved.

Step 1

Using any CLI of your choice (I used Ubuntu OS 20.04), navigate to your Windows user directory.

$ cd /mnt/c/users/user

Step 2

Create a .wslconfig file. You want to make sure it is a WSLCONFIG file, not a txt document.

Create .wslconfig file

To make sure you are creating a WSLCONFIG file, create and edit the document using an IDE. In my case, I use vs-code. So still inside your user directory, enter this:

$   code .wslconfig

This should open your vs-code with the .wslconfig opened. I have a Windows i3-4005U machine (4 processors), and I recently increased the RAM from 6GB to 12GB (this is one of the solutions I tried to solve the problem initially but didn’t work. Got to know WSL2 reserves 80% of your memory by default). With this configuration, I reconfigured my WSL2 with these settings.


Feel free to specify the amount of memory and number of processors you want to allocate to vmmem.

Step 3

With that done, you can save and close the file. To confirm our configuration worked, using Ubuntu, you can go ahead and install neofetch. If you already have neofetch installed, you can just skip the installation process.

$ sudo apt-get install neofetch

Once that is done, we can now use neofetch to obtain information on the new configuration of our vmmem/Ubuntu OS.

$ neofetch

If you don't see changes immediately after running this command, reboot your windows system and re-run the command.

New Ubuntu/vmmem configuration

If this worked for you, give the post a like. Thanks!