High CPU usage for vmmem

Steve Lo 135 Reputation points
2023-03-21T19:12:59.2566667+00:00

Hi,

I have experienced high CPU usage for Vmmem frequently (~every 2days) and the only solution at the moment is simply restart my machine.

It is understood that is related to WSL and I do have a Docker image running on Ubuntu on Windows. However it is not really responding for Ubuntu and Docker (see below) and CPU usage is still that high even I manually close Docker Desktop and run cmd wsl --shutdown.

It's really disruptive for me and any opinion would be appreciated.

Cheers

Steve

User's image

User's image

User's image

User's image

Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Client for IT Pros | User experience | Other

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

12 answers

Sort by: Newest
  1. Sovattha Sok 0 Reputation points
    2025-04-16T08:15:43.7633333+00:00

    I had the problem for 3 years, and the only answer I needed was mentionned in a comment of this page.

    The whole issue is described here:

    https://github.com/microsoft/WSL/issues/6982#issuecomment-864338613

    It looks related to connecting/disconnecting a 2nd monitor.

    So WIN+CTRL+ALT+B will reset the graphics driver, you hear a beep, your display blinks and the vmmem process is finally gone!

    Was this answer helpful?

    0 comments No comments
  2. Pantsleftinwash 5 Reputation points
    2024-10-17T14:06:03.73+00:00

    I get this on win10 + WSL2 - When wsl --shutdown fails, from an admin powershell you can beat wsl to death with Get-Process | Where-Object { $_.Name -like "wsl*" } | Stop-Process

    Was this answer helpful?

    1 person found this answer helpful.
  3. Gagnon, Dominic 0 Reputation points
    2024-09-16T19:35:31.3633333+00:00

    Hi,

    I get this problem a lot; I have some information to share about this to help and I found a workaround: if you put your computer in hibernation and turn it on right after, depending on your root cause, Vmmem will drop near 0% of CPU usage where nothing running was killed in the process.

    I've linked the issue (for my part) to VS Code which (and this is documented to be intended this way) will take one core for the autocomplete feature which, when needed, will take 100% usage of this core. The problem is that running VS Code in Windows attached to WSL to work on a project under WSL's Ubuntu (in my case) will take one core in WSL to do its autocomplete job and it seems that WSL will let the related processes go over 100% CPU (wonder how this is possible) blocking all other process from running smoothly and impairing Windows to access WSL in any means. Once back from hibernation, the CPU usage drop, Windows is able to access the Linux subsystem again and everything goes back to normal.

    I don't understand why Linux processes can go over 100% (as seen with the top command) but I suspects that, under WSL the PC's cores are used as a single core under Linux and thus used entirely by VS Code's auto-complete processes.

    Here is a capture of one of the problematic processes as displayed by top before loosing the connection to the Linux subsystem:

    1833 user 20 0 1328476 107192 44936 S 124.7 0.3 214:56.97 /home/user/.vscode-server/bin/fee1edb8d6d72a0ddff41e5f71a671c23ed924b9/node

    Where 124.7 is in top's %CPU column.

    Was this answer helpful?

  4. Nicolas Vallet 20 Reputation points
    2023-12-18T10:25:41.0933333+00:00

    At my level, I noticed that I have Visual Studio open in remote mode to WSL2 + Docker, every time it occurs. Most of the time, it happens just after I wake up my laptop from sleep mode.

    If I shut down VS, who is trying to reconnect to the remote wsl session, shutdown docker, then shutdown WSL. Vmmem goes away and I can relaunch everything until the next time I put my laptop in sleep mode.

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  5. Fabio Antunes 5 Reputation points
    2023-12-05T03:10:28.4066667+00:00

    Just had this problem and the only way to fix it after having already quit the Docker Desktop app and without having to reboot, was running this in an elevated Powershell prompt (Run as Administrator):

    Restart-Service LxssManager
    

    Was this answer helpful?

    1 person found this answer helpful.