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. Anonymous
    2023-06-07T15:54:52.5933333+00:00

    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.

    Was this answer helpful?

    10 people found this answer helpful.
  2. Limitless Technology 45,246 Reputation points
    2023-03-22T14:19:50.54+00:00

    Hello

    Thank you for your question and reaching out. I can understand you are having query\issues related to vmmem high CPU usage.

    When Docker is running, it uses memory just like any other virtual machine in any virtualizer. Docker is a sort of virtual machine.

    It suggests that you create the following text file at:

    C:\Users<your-username>.wslconfig

    [wsl2]

    memory=2GB # Limits VM memory in WSL 2

    processors=1 # Makes the WSL 1 VM use two virtual processors

    Reference :

    https://devblogs.microsoft.com/oldnewthing/20180717-00/?p=99265

    --If the reply is helpful, please Upvote and Accept as answer--

    Was this answer helpful?