Why the “vmmem” process is consuming a lot of memory and how to fix it

Has the “vmmem” process suddenly started consuming unimaginable amounts of RAM on your computer? No big deal – it’s curable.

Let’s start with the most obvious. Experienced Windows 10 users who have noticed that the “vmmem” process has suddenly (!) Started consuming huge amounts of RAM for its work should urgently contact those. documentation “Windows Subsystem for Linux” (WSL and WSL2).

And now for ordinary users.


Recently, owners of VMocks (virtual machines) for Linux, who were configured via WSL2 with a GUI, often face such a problem. It is rather difficult to determine the cause of such loads, since they arise spontaneously, almost at random moments of the OS operation. Quite often, the load on the RAM begins immediately after waking up from sleep mode.

What is the “vmmem” process and why does it consume a lot of memory

vmmem

WSL consumes a huge amount of memory, even when, relatively speaking, does not work. On current 10 builds, WSL took up to 80% of memory to work, but in the latest versions of the subsystem, this threshold was reduced to 50% (max. 8GB). “vmmem” is a Windows system process; RAM for VM, if in simple words.

The main reason behind the excessive consumption of RAM on “vmmem” is the preconfiguration of the VM. That’s right, in this case, the user who was setting up the VM is to blame, namely, how much PC resources (CPU, RAM, disk and network) will be allocated for the operation of the VM. Perhaps someone went a little too far, underestimated the resource intensity of such tasks? It’s good that everything can be fixed.

How to fix high memory cost from “vmmem”

We will now show you how to reload WSL via the Command Line:

  • press WIN + R, insert the CMD value into the empty line and press the combination CTRL + SHIFT + ENTER;
  • paste the wsl –shutdown command into the console and press ENTER;
  • if the command did not work, use the system explorer to navigate to the following directory:
    • C:\Users\your-username\
  • open with Notepad (or any other text editor) the wslconfig file ;
  • add the following lines to the file and save the changes:
    • [wsl2]
      guiApplications=false
  • restart your PC to completely (!) end the “vmmem” process.

Note: By making the above changes to the wslconfig file, you will no longer be able to use Linux GUI applications on your PC.

Here’s what we recommend: review the VM settings and reduce the amount of PC resources that will be allocated to it. Also, pay attention to the programs running in the background of the system. And be sure, be sure to install the latest updates for Windows 10. The “vmmem” process is a Windows system service, not some malicious element that needs to be gotten rid of.

Leave a Reply

Your email address will not be published. Required fields are marked *