VmmemWSL using 7GB of RAM even when Ubuntu App is closed

2023-03-06T19:55:39.9366667+00:00

After the most recent windows 11 update my VmmemWSL process is running 7-7.5GB of RAM after just a few commands/python scripts. It doesn't decrease, even when closing the Ubuntu app terminal. Forcing shutdown through cmd prompt (wsl --shutdown) does close the process in task manager but VmmemWSL opens up again to 800MB even with thebUbuntu desktop app hasn't been reopened. I have tried to modify the memory allocation in the .wslconfig file in the Ubuntu user directory but this hasn't worked. Only way to terminate it is to restart the laptop. I really need the Linux command line on my windows 11 laptop for my PhD and this issue is making my device unusable. Please help.

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,097 questions
{count} votes

6 answers

Sort by: Most helpful
  1. Limitless Technology 44,431 Reputation points
    2023-03-07T15:15:24.07+00:00

    Hello there,

    Windows creates the Vmmem process to display the resources consumed by virtual machines.

    This might be due to the latest update , try uninstalling them and check if this sorts out the issue. Similar issues have been faced by users after the update which are documented here https://github.com/microsoft/WSL/issues/4166

    You can also try to Forcibly Close the WSL and Restart It to see if there are any improvements.

    Run Command Prompt as an administrator.

    Type "wsl --shutdown."

    Hit Enter

    Hope this resolves your Query !!

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

    14 people found this answer helpful.

  2. Michael Berger 15 Reputation points
    2023-09-04T09:59:16.12+00:00

    Best solution I found so far:
    How to solve Vmmem consuming ungodly amounts of RAM when running Docker on WSL?

    1. Shut down WSL

    First of all, we’ll want to get rid of WSL to free up some resources and make sure it picks up our configuration changes later on.

    Run this on your command line:

    wsl --shutdown
    
    1. Find your .wslconfig file

    Okay, so we need to find the configuration file for WSL. Navigate to %UserProfile% (just paste that text as-is in the address bar of Windows Explorer), and see if you have a .wslconfig file available (make sure you have dotfiles visible first!)

    Or you can try adding %UserProfile%/.wslconfig in a text editor directly.

    If it doesn’t exist yet, don’t fret – that’s normal. Just create it.

    1. Edit your .wslconfig file to limit memory usage

    Okay, configuration abound. You should have something like this in the file:

    [wsl2]
    memory=2GB
    

    If you don’t have it, add it!

    1. Restart Docker

    If you were using Docker, that is :) If you had some other workload, just fire up WSL or whatever depends on it, and it should pick up your new configuration!

    Source: https://www.koskila.net/how-to-solve-vmmem-consuming-ungodly-amounts-of-ram-when-running-docker-on-wsl/

    3 people found this answer helpful.
    0 comments No comments

  3. Juan Ramirez 0 Reputation points
    2023-03-11T16:11:38.67+00:00

    Realmente me sucede lo mismo y desde la actualización está demasiado lento y esto no ayuda cuando uno trabaja con una computadora diariamente. tanto que se me bloquea el computador. Por favor resuelvan esto realmente afecta demasiado y ya considera uno cambiar de sistema operativo. se congela la pantalla y no se puede hacer nada. Ejecuté el comando que sugieren en el comentario anterior y no me funcionó. Intenté cancelar el proceso desde el Administrador de tareas y dice la operación no se pudo completar: "acceso denegado"


  4. PauloFreire-6999 0 Reputation points
    2023-07-06T14:15:39.3033333+00:00

    Just this way it has worked to me:

    Open and run as admin the powershell:

    list the process are using wsl:

    wsl -l -v

    Close the open processes

    wsl -t programName

    if it not close, go to task manager and close it manually

    to finish, run in this command

    wsl --shutdown

    0 comments No comments

  5. julasweta julasweta 0 Reputation points
    2024-05-29T21:18:30.85+00:00

    I have the same problem and the previous solution did not help, it seems that the program does not see .wslconfig

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.