High CPU usage for vmmem

Steve Lo 105 Reputation points


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.



User's image

User's image

User's image

User's image

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,146 questions
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,300 questions
{count} votes

15 answers

Sort by: Most helpful
  1. WFarmer 40 Reputation points

    Hi All,

    I use Docker and WSL2 frequently and have run into this problem many times. It seems to happen semi-randomly after some period of time, ~1-2 days.

    I don't have a solution that addresses the core issue with Vmmem but I do have a workaround that doesn't require rebooting my whole machine. For me, going into Task Manager and ending the "Windows Subsystem for Linux" task is sufficient and Vmmem goes back to normal.
    User's image

    Hope this works and saves people from having to restart every time.

    8 people found this answer helpful.

  2. Walker, James (SI BP AM R&D SYS) 30 Reputation points

    Open cmd prompt, run as admin,

    wsl --shutdown
    6 people found this answer helpful.

  3. Petr Bodnár 30 Reputation points

    Note that this bug seems to have been discussed at https://github.com/microsoft/WSL/issues/6982 for over 2 years already. From there, it looks like pressing Win+Ctrl+Shift+B could also help, as it resets the graphic (video) driver which apparently causes the issue.

    As stated by WFarmer, stopping the Window Subsystem for Linux (wslhost.exe) should work as well. In the linked thread, restarting the Windows service called WslService could help as well.

    Of course, none of this helps with avoiding the issue altogether, unfortunately.

    5 people found this answer helpful.
    0 comments No comments

  4. Nicolas Vallet 10 Reputation points

    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.

    2 people found this answer helpful.
    0 comments No comments

  5. Steve Lo 105 Reputation points

    Thanks for your answer, it's probably fix the symptom by scarifying the performance. However, any idea what is the root cause or how to figure it out? Particularly high cpu with unresponding Ubuntu and no docker running?

    1 person found this answer helpful.