Vmmem windows 10 docker жрет память

I am using Docker to run some containers on Windows 10, and when I was done I noticed an application named vmmem was using almost all of my ram: ~12GB. According to this it is because of Docker and...

I am using Docker to run some containers on Windows 10, and when I was done I noticed an application named vmmem was using almost all of my ram: ~12GB. According to this it is because of Docker and it said if I closed all docker images and containers it would stop. So I stopped and removed all Docker containers and images by the following batch file:

@echo off
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%i
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi %%i

from: https://gist.github.com/daredude/045910c5a715c02a3d06362830d045b6

so when you type docker container ls -a & docker image ls -a they both show nothing. However in Task Manager I still see vmmem using about 4 GB of RAM. What else can I do to stop this? Thanks.

asked Oct 2, 2020 at 1:35

Gabe's user avatar

GabeGabe

4,7433 gold badges25 silver badges49 bronze badges

3

I found the simplest and easiest way to shut down Vmmem is to go into Windows powershell / cmd and enter: wsl --shutdown. This shuts it down.

Bobi arip's user avatar

answered May 3, 2021 at 22:13

Gabe's user avatar

GabeGabe

4,7433 gold badges25 silver badges49 bronze badges

7

Try this way

  1. open start menu -> find ‘Hyper-V Manager’ just by typing
  2. stop the virtual machine -> right-click -> turn off (look at the picture)

enter image description here

answered Apr 15, 2021 at 14:45

Alexandr Kovalenko's user avatar

3

I had a similar issue when I installed docker and realized it was using a lot of ram even when I was not using docker at that moment.

To mitigate this I had to disable docker auto startup such that I only use it when needed instead of auto-starting and running in the background even when not being used:-

  1. Open the Docker panel and go to settings, disable start docker desktop when u log in. The docker vmem process will not auto start next. it will start when you open docker.

enter image description here

answered Jul 18, 2022 at 9:22

Ssebbaale Paul's user avatar

0

Go to Run > Type «services»

Find docker and click stop

Right Click Menu for Docker Desktop Service in Services Window with Stop hovered

Henry Ecker's user avatar

Henry Ecker

33.4k18 gold badges34 silver badges54 bronze badges

answered Feb 11, 2022 at 17:29

richard's user avatar

1

I had similar issue.

Go to Docker Desktop > Settings > Software updates
Then uncheck the box: Automatically check for updates

enter image description here

I don’t know how its related but it works

For more info, visit: https://github.com/docker/for-win/issues/12266

answered Dec 24, 2022 at 17:17

KVSVK's user avatar

KVSVKKVSVK

314 bronze badges

Comments

@Bleki

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: E550E750-34CD-4202-8F8A-A1A0D5C97B9C/20201001091450

Expected behavior

No Vmmem high CPU usage

Actual behavior

High CPU usage for Vmmem

Information

  • Windows Version: Windows 10 Enterprise
  • Docker Desktop Version: 2.4.0.0 (48506)
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: No, it’s a desktop Windows.

Steps to reproduce the behavior

  1. Start Docker Desktop
  2. Watch CPU usage in Task Manager for Vmmem
azumukupoe, sebastianseidel, codemicro, tim-hilt, dslatkin, daisp, mmaher22, ZelCloud, Brambird, orgi, and 52 more reacted with thumbs up emoji

@johanseland

I can confirm that I am also experiencing this problem. I am running Windows 10 Pro and using Docker Desktop 2.4.0.0 (48506)

For me, the high Vmmem CPU usage seems to be tied to running compilation of a large C++ code base using parallel make/ninja.

@johanseland

I did some more digging into this and I have come up with an acceptable workaround. I wonder if the root causes it that Docker Desktop 2.4.0 uses slightly more memory than before, causing the system to start paging to this earlier than it did for 2.3.

These are my observations:

  • The problem goes away for some time if I drop the Linux caches (e.g. echo 1 > /proc/sys/vm/drop_cache inside a wsl2 session)
  • The vmmem process seems to be hogging all CPU, I suspect it is busy waiting when waiting for memory that has been swapped to disk.
  • If I reduce the amount of memory available to wsl2 by editing .wslconfig I am not running into this problem.

According to https://docs.microsoft.com/en-us/windows/wsl/wsl-config the default available memory to wsl2 is 80% of physical RAM. On my 16 GB machine this amounts to 12GB, which was enough for the system to start swapping with quite light usage of application on the host system (e.g. Visual Studio Code, Edge, some terminal windows). Limiting the amount to 10GB removed the problem for me altogether yesterday. I could successfully run the large compilation mentioned above without vmmem using all CPU.

inhumantsar, juancarrey, camerondurham, daisp, ntdash, danjrwalsh, CameronAHSA, acpopper, and jSadoski reacted with thumbs up emoji
inhumantsar, juancarrey, and jp2373 reacted with hooray emoji

@inhumantsar

Can confirm that editing wsl-config to enforce global resource limits helped stabilise memory and CPU usage.

Worth keeping in mind just how much memory all this stuff takes up though. On my system, after a fresh reboot and starting up Docker Desktop, vmmem usage sits around 1.5GB. +1GB for K8S. +1GB if I open up a new distro (Ubuntu 20.04). If the limits are set too low, the VM will start swapping again.

@ERGeorgiev

Some CPU and all of my ram, nothing running. Happened after a build, it’s been 30 minutes and its still sitting there. Shutting down docker does not help.
Docker_Desktop_B47KC5fcCL

Doug-Murphy, promaty, akaltar, nikolaminic1, DubZero, felix-penrose, duemti, Jose-cd, SourceCode, Brubning, and 3 more reacted with thumbs up emoji

@cactysman

This started happening to me too over the past few days.
Took a while to identify Docker Desktop as the cause.

Taskmgr_2021-01-06_16-43-12

@cactysman

Disabling the Kubernetes cluster fixed this for me btw, so there gotta be an issue with that part(?).

@mediplex

Same issue here.
vmmem takes 2gb+ after a reboot and no container running yet!
Once I run my dev container it eats up all the remaining memory.

Config: windows 10 20H2 (latest) and docker 3.1 (latest)

jonhwong, ZelCloud, chinhuat, cradleguard, SourceCode, Steve0929, buntagonalprism, Captain-P-Goldfish, MaciejWiatr, LCHung3997, and Candinya reacted with thumbs up emoji

@sergey-derugo

@ivanrodriguezfernandez

In the past we could configure limits with .wslconfig but now my computer ignore this seetings.

Microsoft Windows 10 Enterprise (10.0.19041 N/A Build 19041)
Docker for Desktop: 3.2.2 (61853)

@liny01-nbsa

Same issue.

Windows Version: 20H2 (OS Build 19042.804)
Docker for Desktop: 3.2.1

@Dherlou

Same issue here. WSL already consumes like 12 out of my 16 GB RAM after startup, although not a single container is running.
Currently mitigated by above workaround with limiting the memory, but this is surely not a suitable fix.

Windows Version: 20H2 (OS Build 19042.928)
Docker for Desktop: 3.3.1

@Marcin-TA

I have the same issue. 100% CPUT and 80% RAM is used by Vmmem.

@acurvers

@Gabriellavoura

Same here, 98% RAM (15.4GB) and 100%CPU used by Vmmem, with no containers running.
Win pro build 19042
WSL2
Docker Desktop version 3.3.1 (63152)

@onomatopellan

@Gabriellavoura

@rnemeth90

Same issue here. VMMem process is using 2-3 GB of RAM, despite no running containers. Kubernetes is not enabled.

Docker Desktop: 3.3.3 (64133)
Windows 10 Enterprise 21H1 (19043.964)

Setting memory limits for WSL is not a solution in my opinion, as it will limit the number of containers I’m able to run concurrently.

@kamerat

Same for me. Even after quitting docker-desktop (Right click — quit docker desktop) vmmem does not exit.

Also, even tho Docker is not in boot, vmmem still spins up.

Manually doing wsl --shutdown in a terminal makes it stop though.

@vanquang9387

Same for me.
vmmem takes ~ 2GB memory without running any images.

Edition Windows 10 Pro
Version 21H1
OS build 19043.985
WSL2
Docker Desktop verion 3.3.3

@Matsemann

$ wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu-20.04           Stopped         2
  docker-desktop-data    Running         2
  docker-desktop         Running         2

$ docker ps
<nothing>

even with this, vmmem sometimes uses ~50%+ cpu and a couple of gigs of ram. wsl --shutdown and restarting docker engine works, but only temporarily. If I run my Ubuntu image and run htop, I can see lots of memory and cpu being used, but not any processes using that cpu/ram.

@konradgadecki

C: > wsl --list --verbose
  NAME                   STATE           VERSION
* Ubuntu-20.04           Running         2
  docker-desktop-data    Running         2
  docker-desktop         Running         2
C: > docker ps -a
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
<nothing>

I noticed this issue happens right after I create a docker image with docker build command locally on my pc. Memory utilization by vmmem process grows rapidly and never goes down, even if Docker Desktop (the latest version) is restarted. Only pc restart helps in this case for me so it all of this makes a local development difficult. Is there any solution?

image

@duemti

«docker will simplify the development» … they said. Now my pc sounds like a jet engine. Also, spent ton of time figuring why that happens, to also find that i can’t stop it (not at least without much overhead).

sergey-derugo, Dolphinsimon, therealdandecker, jackrdye, matrasmusson, denisecase, kasvith, alexdevero, davidrot, stanciupaul, and 3 more reacted with thumbs up emoji
kamerat, michvllni, paulmiller3000, krisanalfa, Jose-cd, matrasmusson, michael-malarchuk, kasvith, alexdevero, davidrot, and matthew-e-brown reacted with laugh emoji

@paulmiller3000

@danmaina

An alternative workaround that worked for me was to disable WSL 2 and use Hyper V. Docker may not be as fast but at least resources are much more reasonable.

Disable WSL 2 use in docker under settings

image

Disable WSL in windows features

image

image

If you are using WSL for other tasks or want the extra docker perfomance, this may not be the solution you are looking for. It works only as a workaround.

@canardaaydin

Same issue, even though non of the containers are working, vmmem eats 16.5gb of ram.

@UltraWelfare

Same issue here. Not a single container ever created, it will still eat all of the RAM.
The .wslconfig isn’t a fix as VMmem will still eat up to the limited amount specified on the file…

@kamerat

This comment has been minimized.

@UltraWelfare

An alternative workaround that worked for me was to disable WSL 2 and use Hyper V. Docker may not be as fast but at least resources are much more reasonable.

This is a good solution but unfortunately not available to users with Windows 10 Home.
Hyper-V is only available for «Windows 10 Enterprise, Pro, or Education» (source)

@therealdandecker

@danmaina the Hyper-V solution is the only one that worked for me as well (tried wslconfig and all that.) It is really maddening that this issue seems to get largely ignored.

@Matsemann

@philippeantonietti

same problem, docker is consuming a tremendous amount of CPU =(

@rcyost

@Marcin-TA

I noticed that version 4 of docker is super slower on win10 :(

@Dolaned

This is happening to me running docker in a nested vm on a 5950x on windows 11, the VM is windows 10

@DarioLopes

Hi same here, Docker is pretty useless on Windows (run fine on Ubuntu though)

@kasvith

Hi Im having the same high CPU usage problem.

@LaBlazer

Any update on this? I’m experiencing the same issue…

@brunosalvino

Same here: after Windows startup, I start Docker Desktop, «Vmmem» memory usage goes to 2GB without any container running. I’m sitting here looking at Task Manager and «Vmmem» memory usage keeps going up all by itself. It has to be a memory leak.

Windows 10 Pro 21H2 build 19044.1466
Docker Desktop 4.4.4 (73704), Docker Engine v20.10.12

.wslconfig
[wsl2]
memory=4000MB
processors=4

@lojell

Same issue for me, high memory consumptions even when no containers are running

@Steven73041

Same here in windows 11. Docker not running at all but CPU 100% + RAM consuming. I opened docker and closed it and fixed.

@luxalpa

I have the same problem. I don’t have WSL set up but instead use the Hyper-V version. Docker Desktop is not running. Launching it shuts down the Hyper-V machine and then starts it again, resolving the issue. There’s also tons of error messages in the console but I wasn’t able to capture those yet. I only remember that it was something about vpnkit (I don’t use a VPN).

@jimmycd

+1
Win 11
image
.wslconfig is

[automount]
root = /

[wsl2]
memory=4GB   # Limits VM memory in WSL 2 up to 3GB
processors=2 # Makes the WSL 2 VM use two virtual processors

[user]
default = root

image

after fresh reboot (docker desktop autostarting, kubernetes active, nothing else active on the machine) -> CPU Fan goes wild
image

try #1: stopping Kuberntes, docker desktop still active -> no change
try #2: disabling wsl distro integration -> no change
try #3: stop wsl: wsl — shutdown —> vmmem dispappears (no wonder)
try #4: bash (starts wsl default distri) -> normal behaviour (only default distri is up)
try #5: restart docker desktop: now all 3 distris are up and NORMAL BEHAVIOUR!

—> wsl — shutdown and restarting docker-desktop is a workaround (and only this).

@paddelboot

Similar issue here. Docker Desktop is consuming ~20% of CPU without any containers running.

Vmmem is consuming ~2GB in idle.

image

image

image

@docker-robot

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@NebraskaCoder

Sad to see this issue go ‘stale’ with no resolution.

@Dherlou

/remove-lifecycle stale
Far from stale, unfortunately…

@BarMol3

Still very much an issue!

@Steven73041

For me, after updates it is ok.

@nicks

Hi all! sorry to hear you’re having problems.

From the history of this thread, it sounds like there are several different issues related to CPU/RAM usage being reported here — some are fixed and some might not be. The original issue has a workaround that is described further up-thread (editing the wsl-config — #8742 (comment)). Some of the issues are tracked elsewhere in this issue tracker.

Because the original issue has a workaround, I’m going to close this. It’s hard for us to inform people when your individual issue is fixed if we’re lumping all resource utilization problems into a single issue.

If you believe your problem is still there, please file a new issue with specific repro steps and a diagnostic ID.

@docker-robot

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker
docker

locked and limited conversation to collaborators

Sep 21, 2022

I installed docker on windows home which uses WSL2 as a backend. However, since doing this a process called vmmem seems to be consistently consuming a lot of computational resources. I ran docker stop $(docker ps -aq) to kill all running containers (there were 12 — oops) which has improved the issue significantly. However, even after closing docker down vmmem is still taking ~1.5 — 2Gb of ram and ~20% CPU. Since there are no longer any containers running, shouldn’t the resource consumption of vmmem be minimal? How can I reduce the consumption of the vmmem process?

asked Jun 9, 2020 at 10:06

CiaranWelsh's user avatar

CiaranWelshCiaranWelsh

2,1565 gold badges16 silver badges19 bronze badges

2

Daniiel B is on the money. To turn off Vmmem simply go into Powershell or whatever terminal you like to use under admin rights and enter the command wsl --shutdown, when your done with playing in wsl1/2.

Sadeq Dousti's user avatar

answered Jul 28, 2020 at 9:36

smigel 's user avatar

smigel smigel

1,6081 gold badge5 silver badges3 bronze badges

4

I edit the WSL config to limit the memory usage as mentioned here.

# turn off all wsl instances such as docker-desktop
wsl --shutdown
notepad "$env:USERPROFILE/.wslconfig"

Set the values you want for CPU core and Memory:

[wsl2]
memory=3GB   # Limits VM memory in WSL 2 up to 3GB
processors=2 # Makes the WSL 2 VM use two virtual processors

Shibumi's user avatar

answered Mar 24, 2021 at 0:20

Adonis H.'s user avatar

Adonis H.Adonis H.

9193 silver badges2 bronze badges

vmmem even after docker has shut down, will run for a few seconds up to 1 minute before completely shutting off. So try shutting down your containers and docker and it should disappear soon enough.

The accepted answer talks about shutting down WSL (the windows subsystem for Linux) which makes sense if you actually opened and installed a distro, but since you mentioned about Docker, i’m guessing your vmmem is just showing the usage of docker containers only.

Here’s a nice explanation from a trustworthy individual : https://devblogs.microsoft.com/oldnewthing/20180717-00/?p=99265

Edit:

Considering the main question was about how to reduce the consumption of RAM, and since you’re using docker; take a look at : Docker Resource Contraints

More specifically the --memory=2g parameter, you can limit the RAM a container will use, and in turn vmmem itself will use less RAM as well.

answered Nov 9, 2020 at 13:01

Lorenzo's user avatar

LorenzoLorenzo

4694 silver badges5 bronze badges

4

Restart WSL2, by running the following command in PowerShell right click and run in Administrator mode:

Restart-Service LxssManager

answered Mar 18, 2021 at 8:23

Michael Kaufman's user avatar

2

The memory is being consumed by Linux to cache files. It can be seen in the buff/cache section of free command. To drop the cache, simply run echo 3 | sudo tee /proc/sys/vm/drop_caches.

answered Jan 10, 2021 at 22:51

tejasvi88's user avatar

tejasvi88tejasvi88

2682 silver badges11 bronze badges

1

If you want to stop vmmem process, try this way

  1. open start menu -> find ‘Hyper-V Manager’ just by typing
  2. stop the virtual machine -> right-click -> turn off

enter image description here

answered Apr 15, 2021 at 14:52

Alexandr Kovalenko's user avatar

In my case I do not have WSL installed but do have Docker. I had shut down the docker process ungracefully then noticed some time later that vmmem was using a lot of CPU. Windows did not allow me to kill the vmmem process.

I had to open Docker again and shut it down gracefully via the system tray icon. After that vmmem was no longer running at all.

answered Dec 4, 2020 at 20:55

Bill Tarbell's user avatar

5

This question was around 2 years old at the time I looked at it and was I was experiencing just now seeing the problems. Might be due to enabling Kubernetes inside Docker for Windows (I’m not sure about that).

I was able to shutdown the Windows Subsystem for Linux (WSL) using the wsl --shutdown command which did free memory but disabled the use of Docker.

So, I updated my ~/.wslconfig file (aka %USERPROFILE%.wslconfig) as suggested to reduce memory. I believe that helped.

Later found out is my WSL subsystem was out of date and not being updated (by default) with Windows Updates because I had disabled Receive updates for other Microsoft products when you update Windows.

So I enabled that, and ran wsl --update (in admin shell), and my WSL version was updated from 3/16/21 (Kernel Version 5.4.72) to today (5/2/22) (Kernel Version 5.10.102.1).

I’m hoping this will also help.

answered May 2, 2022 at 16:03

PatS's user avatar

PatSPatS

3451 gold badge3 silver badges12 bronze badges

2

According to this thread: https://github.com/microsoft/WSL/issues/6982, using memory setting in .wslconfig doesn’t always work.

Solution seems to be to:

  1. Add this to Users<USERPROFILE>.wslconfig (create the file if it doesn’t exist)
[wsl2]
guiApplications=false
  1. Restart wsl by running wsl --shutdown in powershell or command prompt (it says shutdown but it actually stops and restarts all running wsl distributions)

answered Jan 16, 2022 at 19:22

lmb's user avatar

Could it relate to this????

For my issues, high CPU and high RAM usage by vmmem, I have tried all the solutions I could look up here and elsewhere for WSL2. It seems that for some types of tasks, WSL2 will eat up your memory and not spit it out when done…

Exceptions for using WSL 1 rather than WSL 2:

  • WSL 2’s memory usage grows and shrinks as you use it. When a process
    frees memory this is automatically returned to Windows. However, as
    of right now WSL 2 does not yet release cached pages in memory back
    to Windows until the WSL instance is shut down. If you have long
    running WSL sessions, or access a very large amount of files, this
    cache can take up memory on Windows.
    https://docs.microsoft.com/en-us/windows/wsl/compare-versions

I don’t need WSL2 for this specific task… I’m trying WLS1 now…

I’ll post an update on how it goes…

Update: Shifting to WSL1, solves it for me when running many subprocesses, it seems. I have been running way past the time point where it overloads the RAM and comes to a halt.

answered Apr 23, 2022 at 9:36

MikeBoolean's user avatar

1

open cmd as Admin

net stop vmcompute

answered Jun 30, 2022 at 14:39

Emmanuel Mavely's user avatar

I just created the %UserProfile%.wslconfig file with these two lines and left everything else untouched. It worked fine.

[wsl2]
memory=8GB

I did a full shutdown right after adding the file for WSL to pick up the new settings.

$ wsl --shutdown

See additional information from Microsoft here: Advanced settings configuration in WSL

answered Nov 16, 2022 at 4:04

Jorge Garcia's user avatar

I installed docker on windows home which uses WSL2 as a backend. However, since doing this a process called vmmem seems to be consistently consuming a lot of computational resources. I ran docker stop $(docker ps -aq) to kill all running containers (there were 12 — oops) which has improved the issue significantly. However, even after closing docker down vmmem is still taking ~1.5 — 2Gb of ram and ~20% CPU. Since there are no longer any containers running, shouldn’t the resource consumption of vmmem be minimal? How can I reduce the consumption of the vmmem process?

asked Jun 9, 2020 at 10:06

CiaranWelsh's user avatar

CiaranWelshCiaranWelsh

2,1565 gold badges16 silver badges19 bronze badges

2

Daniiel B is on the money. To turn off Vmmem simply go into Powershell or whatever terminal you like to use under admin rights and enter the command wsl --shutdown, when your done with playing in wsl1/2.

Sadeq Dousti's user avatar

answered Jul 28, 2020 at 9:36

smigel 's user avatar

smigel smigel

1,6081 gold badge5 silver badges3 bronze badges

4

I edit the WSL config to limit the memory usage as mentioned here.

# turn off all wsl instances such as docker-desktop
wsl --shutdown
notepad "$env:USERPROFILE/.wslconfig"

Set the values you want for CPU core and Memory:

[wsl2]
memory=3GB   # Limits VM memory in WSL 2 up to 3GB
processors=2 # Makes the WSL 2 VM use two virtual processors

Shibumi's user avatar

answered Mar 24, 2021 at 0:20

Adonis H.'s user avatar

Adonis H.Adonis H.

9193 silver badges2 bronze badges

vmmem even after docker has shut down, will run for a few seconds up to 1 minute before completely shutting off. So try shutting down your containers and docker and it should disappear soon enough.

The accepted answer talks about shutting down WSL (the windows subsystem for Linux) which makes sense if you actually opened and installed a distro, but since you mentioned about Docker, i’m guessing your vmmem is just showing the usage of docker containers only.

Here’s a nice explanation from a trustworthy individual : https://devblogs.microsoft.com/oldnewthing/20180717-00/?p=99265

Edit:

Considering the main question was about how to reduce the consumption of RAM, and since you’re using docker; take a look at : Docker Resource Contraints

More specifically the --memory=2g parameter, you can limit the RAM a container will use, and in turn vmmem itself will use less RAM as well.

answered Nov 9, 2020 at 13:01

Lorenzo's user avatar

LorenzoLorenzo

4694 silver badges5 bronze badges

4

Restart WSL2, by running the following command in PowerShell right click and run in Administrator mode:

Restart-Service LxssManager

answered Mar 18, 2021 at 8:23

Michael Kaufman's user avatar

2

The memory is being consumed by Linux to cache files. It can be seen in the buff/cache section of free command. To drop the cache, simply run echo 3 | sudo tee /proc/sys/vm/drop_caches.

answered Jan 10, 2021 at 22:51

tejasvi88's user avatar

tejasvi88tejasvi88

2682 silver badges11 bronze badges

1

If you want to stop vmmem process, try this way

  1. open start menu -> find ‘Hyper-V Manager’ just by typing
  2. stop the virtual machine -> right-click -> turn off

enter image description here

answered Apr 15, 2021 at 14:52

Alexandr Kovalenko's user avatar

In my case I do not have WSL installed but do have Docker. I had shut down the docker process ungracefully then noticed some time later that vmmem was using a lot of CPU. Windows did not allow me to kill the vmmem process.

I had to open Docker again and shut it down gracefully via the system tray icon. After that vmmem was no longer running at all.

answered Dec 4, 2020 at 20:55

Bill Tarbell's user avatar

5

This question was around 2 years old at the time I looked at it and was I was experiencing just now seeing the problems. Might be due to enabling Kubernetes inside Docker for Windows (I’m not sure about that).

I was able to shutdown the Windows Subsystem for Linux (WSL) using the wsl --shutdown command which did free memory but disabled the use of Docker.

So, I updated my ~/.wslconfig file (aka %USERPROFILE%.wslconfig) as suggested to reduce memory. I believe that helped.

Later found out is my WSL subsystem was out of date and not being updated (by default) with Windows Updates because I had disabled Receive updates for other Microsoft products when you update Windows.

So I enabled that, and ran wsl --update (in admin shell), and my WSL version was updated from 3/16/21 (Kernel Version 5.4.72) to today (5/2/22) (Kernel Version 5.10.102.1).

I’m hoping this will also help.

answered May 2, 2022 at 16:03

PatS's user avatar

PatSPatS

3451 gold badge3 silver badges12 bronze badges

2

According to this thread: https://github.com/microsoft/WSL/issues/6982, using memory setting in .wslconfig doesn’t always work.

Solution seems to be to:

  1. Add this to Users<USERPROFILE>.wslconfig (create the file if it doesn’t exist)
[wsl2]
guiApplications=false
  1. Restart wsl by running wsl --shutdown in powershell or command prompt (it says shutdown but it actually stops and restarts all running wsl distributions)

answered Jan 16, 2022 at 19:22

lmb's user avatar

Could it relate to this????

For my issues, high CPU and high RAM usage by vmmem, I have tried all the solutions I could look up here and elsewhere for WSL2. It seems that for some types of tasks, WSL2 will eat up your memory and not spit it out when done…

Exceptions for using WSL 1 rather than WSL 2:

  • WSL 2’s memory usage grows and shrinks as you use it. When a process
    frees memory this is automatically returned to Windows. However, as
    of right now WSL 2 does not yet release cached pages in memory back
    to Windows until the WSL instance is shut down. If you have long
    running WSL sessions, or access a very large amount of files, this
    cache can take up memory on Windows.
    https://docs.microsoft.com/en-us/windows/wsl/compare-versions

I don’t need WSL2 for this specific task… I’m trying WLS1 now…

I’ll post an update on how it goes…

Update: Shifting to WSL1, solves it for me when running many subprocesses, it seems. I have been running way past the time point where it overloads the RAM and comes to a halt.

answered Apr 23, 2022 at 9:36

MikeBoolean's user avatar

1

open cmd as Admin

net stop vmcompute

answered Jun 30, 2022 at 14:39

Emmanuel Mavely's user avatar

I just created the %UserProfile%.wslconfig file with these two lines and left everything else untouched. It worked fine.

[wsl2]
memory=8GB

I did a full shutdown right after adding the file for WSL to pick up the new settings.

$ wsl --shutdown

See additional information from Microsoft here: Advanced settings configuration in WSL

answered Nov 16, 2022 at 4:04

Jorge Garcia's user avatar

vmmem, supposedly something to do with virtual machines, uses 1.5 GB of RAM even though no VM is active in Hyper-V. I do run docker though. The vmmem is also run as a user with a username which looks something like E076D8C-04EC-…

Is this expected behavior or is there some way I can troubleshoot it?

Edit: I shut down the Docker Desktop and then the vmmem is not there anymore.

asked Sep 6, 2020 at 0:00

Niklas Rosencrantz's user avatar

Docker is a type of virtual machine, and if it is running, it will use memory like any virtual machine in any virtualizer.

«Proof» You shut down Docker (the machine) and the memory is released. This, too, is completely normal.

All is well.

answered Sep 6, 2020 at 0:08

John's user avatar

JohnJohn

41.7k2 gold badges30 silver badges53 bronze badges

3

See How to Stop WSL2 from Hogging All Your Ram With Docker

It suggests that you create the following text file at:

C:Users<your-username>.wslconfig
[wsl2]
memory=4GB # Limits VM memory in WSL 2 to 4 GB
processors=2 # Makes the WSL 2 VM use two virtual processors

It allows you to limit the amount of RAM used by vmmem.

answered Nov 4, 2021 at 10:59

Simon E.'s user avatar

Simon E.Simon E.

3,6875 gold badges29 silver badges30 bronze badges

For first try so:

wsl --shutdown

answered Dec 9, 2022 at 20:07

Legioneroff's user avatar

0

This post was most recently updated on January 5th, 2023.

4 min read.

This was another (luckily pretty shallow) rabbit hole down some corporate IT and weird default configurations by our favorite tech-daddy Microsoft. In this article, I will describe one possible reason for a process called Vmmem.exe consuming enough RAM to crash pretty much everything else running on your machine.

But let’s take a step back first – what happened?

Problem

I was developing some Azure IoT Edge modules (as one does), when my dev laptop was starting to feel a bit sluggish. That’s nothing out of the ordinary, though – I often have more than 3 tabs open in Chrome, so it’s not unusual for the machine to start slowing down, especially if I try having any Electron apps open.

But then one of said Electron apps started behaving even more annoyingly – namely, Teams started crashing and restarting in a loop.

I don’t care too much about Teams not running every now and then, but a restart loop flashing on one of my screens DOES start to bother me after a while. So I started looking into it.

This is what’s shown for about 3 seconds before Teams automatically restarts (only to crash again).

Microsoft Teams in a crash-restart -loop
Microsoft Teams in a crash-restart -loop

The obvious first step was to fire up Task Manager and see what was up. So, what do I find?

I wonder if it's just Chrome and a couple of Electron apps doing this, or do we get to blame something else for this memory usage?
I wonder if it’s just Chrome and a couple of Electron apps doing this, or do we get to blame something else for this memory usage?

Oh. Okay. That’s not normal. 28 GB of RAM in use even though I’m not running a full SharePoint farm on this laptop? That’s a bit weird. Is OneDrive acting up again?

Let’s take a look…

Vmmem.exe consuming somewhat unreasonable amounts of RAM. I mean, just compare it to Chrome...
Vmmem.exe consuming somewhat unreasonable amounts of RAM. I mean, just compare it to Chrome…

Ohhhhhh. That’s even more abnormal, and won’t be solved by simply shutting down all 15 OneDrive clients on my machine. Vmmem is something else. What’s going on?

Reason

This one was caused by WSL acting up, as Vmmem is the process that represents the memory allocation for your Virtual Machines, and I was most definitely running a bunch of Docker containers as part of my development workflow.

So Docker, with WSL, has incredibly high memory consumption.

WSL reserves a lot of memory, even if it doesn’t need it. On current Windows builds (technically speaking, pre-20175, but that’s a Windows Insiders build, so most of y’all out there don’t have it), WSL can consume up to 80% of your memory. This has been changed in later builds to be 50%, up to 8GB. Which is still non-trivial, if you plan to run Teams and Chrome at the same time with WSL.

Personally, I ran into this issue on my work laptop, which is running an archaic version of Windows 10 anyway (not something I chose, but hey, that’s corporate IT for you). And probably will be, until Windows 12 is out. So no Insider builds for me (unless Microsoft leaks them in the Current/GA channel again).

Just got the confirmation from our corporate IT on #Windows11 upgrade schedule:
NEVER
We’re apparently waiting for #Windows12. 😂 https://t.co/HaW2WSXMyV

Image

Anyway, the gist of the story is, that when running Docker on WSL (in my case, for developing Azure IoT Edge modules), you might find yourself running out of memory very, VERY easily. 😁

And to be fair, this can happen even if you don’t actually have any containers running in Docker in WSL. WSL alone might just do.. Something, and consume 9 gigabytes of RAM. I guess that’s just a thing Linux does if left alone? Who knows. But it needs a bit of trimming.

As I have learned the hard way over the last few years (avoiding) working with it.

Luckily, this is one of the easiest performance issues to fix, ever. Let’s get to it, then!

Solution

This applies to WSL2. If you’re running WSL1, you probably shouldn’t.

Time needed: 20 minutes.

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

  2. 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.

  3. 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, add it!

  4. 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!


And that’s it! Did it help in your case? Let me know in the comments section below!

References

  • What is Vmmem?
    • https://devblogs.microsoft.com/oldnewthing/20180717-00/?p=99265
  • .wslconfig documentation
    • https://docs.microsoft.com/en-us/windows/wsl/wsl-config
  • Windows 10 builds / channels
    • https://docs.microsoft.com/en-us/windows/release-health/release-information
  • Author
  • Recent Posts

mm

Antti Koskela is a proud digital native nomadic millennial full stack developer (is that enough funny buzzwords? That’s definitely enough funny buzzwords!), who works as Solutions Architect for Precio Fishbone, building delightful Digital Workplaces.

He’s been a developer from 2004 (starting with PHP and Java), and he’s been working on .NET projects, Azure, Office 365, SharePoint and a lot of other stuff. He’s also Microsoft MVP for Office Development.

This is his personal professional (e.g. professional, but definitely personal) blog.

mm

Vmmem — Это процесс для отображения потребляемых ресурсов виртуальными запущенными машинами Hyper-V в Windows 11/10, который можно увидеть в диспетчере задач.

Процесс Vmmem можно увидеть в диспетчере задач и, если виртуальные машины в данный момент работают, то можно заметить, что Vmmem потребляет много ресурсов компьютера или ноутбука и грузит ЦП, память или диск. Это касается не только виртуальных машин, но и WSL (подсистемы Linux).

Vmmem процесс в диспетчере задач

Как исправить нагрузку на ПК процессом Vmmem в Windows 11/10

Процесс Vmmem может грузить ЦП, Память и Диск только в том случае, если запущен WSL или включены виртуальные машины. Кроме того, Vmmem может внезапно грузить ваши компоненты ПК и это связано с тем, что на виртуальной машине произошли какие-либо действия, к примеру начали устанавливаться обновления для системы.

1. В первую очередь, напишите в поиске меню пуск «диспетчер Hyper-V» и запустите. Посмотрите, какая машина потребляет много ресурсов. Возможно в данный момент на виртуальной машине происходят какие-либо действия. Завершите все действия в виртуальной машине и выключите её, нажав по работающей машине правой кнопкой мыши и Завершение работы.

! В параметрах созданных виртуальных машин, вы сможете ограничен использование ядер процессора и выделение оперативной памяти. Это поможет снизить нагрузку на процесс Vmmem и систему в целом, но не гарантирует быструю дальнейшую работу виртуальных машин Hyper-V.

ресурсы виртуальных машин Hyper

2. Если будет работать WSL (подсистема Linux), то её нужно отключить. Чтобы отключить WSL, запустите командную строку от имени администратора и введите команду ниже:

  • wsl --shutdown
  • Перезагрузите ПК

wsl shutdown

3. Если процессы связанные со службой WSL2 зависли и работают некорректно, то это может быть причиной высокой нагрузки на систему с Windows 11/10 процессом Vmmem, и перезапуск службы WSL2 может помочь исправить это. Введите следующую команду, запущенную с повышенными правами, и введите:

  • Restart-Service LxssManager

перезапуcтить WSL2 службу

4. На форуме Mcirosoft некоторым пользователям помог выход из программы Docker Desktop (программа для работы с контейнерами).


Смотрите еще: 

  • Что за процесс Lockapp.exe в Windows 10?
  • Что за процесс Agent.exe в Windows 10?
  • Что за процесс ASUS Com Service (atkexComSvc.exe) в Windows 10?
  • Что за процесс dllhost.exe COM Surrogate в Windows 10
  • Что за процесс WSAPPX и как он влияет на процессор и жесткий диск в Windows 10

[ Telegram | Поддержать ]

Windows 10 features a wealth of different processes that all come together to provide an optimal user experience. Some of these processes function in the background and are potentially harmless. In addition, you can see these using the Task Manager. Some, however, appear to be safe initially but soon become hazardous for the overall system resources on a Windows PC. In cases like these, you will see a major decrease in the device’s performance, ultimately leading you to seek out a solution.

One of these troublesome processes is Vmmem. At first, this utility feels like a bug as it causes excessive memory usage. This is an abnormal scenario, and you have to deal with the issue to restore your device’s optimal performance. This guide will cover how to fix Vmmem high memory usage in Windows 10, so keep reading for multiple solutions to this issue.

What is Vmmem in Windows 10?

Vmemm high memory usage in Windows 10

Vmemm high memory usage in Windows 10

“Vmmem” in Windows 10 appears as a process, similar to how other services have their place in the Windows 10 Task Manager. Whenever it pops up and doesn’t appear to be using many system resources, you might as well ignore it since it’s pretty much harmless at that stage.

However, if the process is measuring up to consume a lot of memory on your end, say about 90%-100% of the total RAM available on the device, that is where trouble will spring up, making it necessary to take a closer look at the process at hand. Upon more careful inspection, it turns out that Vmemm relates to all the virtual machines running on your Windows PC.

It is a system-created process that surfaces to describe to the user how much resources are being utilized by virtual machines on the device. When you don’t have any virtual machine operating, you’re less likely to see the Task Manager’s Vmmem process rise.

However, if you’d like to know how virtual memory works on a Windows PC, check out our guide on everything you need to know about virtual memory. With that being said, let us get right into the best methods that have proved to fix the Vmmem high memory usage in Windows 10.

Fixing the Vmmem high CPU and memory usage issue in Windows 10

We have compiled the best ways people have employed to fix the Vmmem high memory usage issue in Windows 10. Follow the listed guidelines and try replicating them on your end carefully.

Restart the PC

Let us start this whole scenario with an easy-to-follow solution. Although this one is quite the oldest ones in the book, many people cannot deny the effectiveness of a simple reboot. It often helps PCs get a fresh restart, quite literally, and absorb some breathing room. Moreover, restarting your device automatically kills unwanted background processes, so you’re automatically freeing up many system resources.

In addition, the Vmmem high memory usage issue can result from a temporary spike in virtual machine utilization. Therefore, it is undoubtedly worth restarting your PC before jumping into the more complicated and time-consuming end of the fixes.

Adjust the allotted memory for running virtual machines on your Windows PC

One common mistake that most people commit is inadvertently allowing a high amount of RAM for their virtual machines running on the device. Now, this is the most straightforward cause of Vmmem’s high memory usage issue since you’re the one actually at fault here. In this case, all you have to do is readjust the virtual machine that you’re currently executing, so it doesn’t eat away a ton of system resources.

If you’re using software like Virtualbox on Windows, we can help you configure your virtual machine optimally. Check out this specialized guide for more information. You need to optimize the amount of allotted memory to your virtual machines, so they can utilize a stable level of RAM and not go overboard.

Try going through this potential fix to see if it brings any favorable results. If you’re still unable to get Vmmem back to a normal level, the issue might be more deep-rooted. Let’s get into the next fix.

Shut down WSL

WSL is short for Windows Subsystem for Linux. It is an integral component of Windows 10 and Windows 11 as well. This utility’s main purpose is to offer a virtualization solution for Windows users. It makes it possible to execute Linux binaries with the help of a virtual machine.

This process is one of the most essential services in Microsoft Windows that plays a crucial role in virtualization. You can even use WSL to run Linux apps on Windows 10 and Windows 11. If you want to find out how to do that exactly, check out this guide.

Now, WSL doesn’t always run smoothly. Sometimes, it is the main cause behind the Vmmem high memory usage issue. Therefore, in this potential solution, we will try fixing the problem by temporarily shutting down WSL to see if Vmmem starts reverting to a normal resource utilization level.

The following steps are going to explain how to do that.

1. The first step is to open the Command Prompt on your Windows PC. Please make sure that you run the application as an administrator to avoid any future mishaps.

Opening Command Prompt

Opening Command Prompt

2. After opening the Command Prompt, you will have to enter the following command into the operational tool that we have running. Following the input, this specific command will do the trick for us.

wsl --shutdown

Rebooting the WSL service

Rebooting the WSL service

3. After inputting the last step, the Terminal will return you with your username, affirming that the command above was a success. However, you are not quite done yet. It’s necessary to restart your PC at this stage to continue the process. Do that from your Windows Start menu and move forward.

Restarting the PC

Restarting the PC

4. After restarting your PC, check your Task Manager to see if Vmmem is still consuming an undesirable amount of RAM or other system resources. If the problem seems to be fixed now, it’s worth rebooting the WSL service again in case you ever want to employ the functionality of Linux again on your Windows PC.

Otherwise, if you leave WSL shut down, forget about being able to use Linux. Therefore, open Windows Powershell to continue from here on out. Search for it in the Windows Start menu, and don’t forget to run the app as an administrator to avoid future issues.

Running Windows Powershell as an administrator

Running Windows Powershell as an administrator

5. After Windows Powershell launches, type in the following command to kickstart the WSL service again. Press the “Enter” key when you are done.

Restart-Service LxssManager

Restoring the functionality of WLS

Restoring the functionality of WLS

That’s about it for this fix! If you’ve managed to fix the Vmmem high memory usage issue on your end, congratulation! However, if nothing has worked so far, you need to try out the final solution that we have coming up next in this guide.

Terminate the running virtual machines

If no other solution has proved fruitful for you so far, you have no other option but to opt for the through-and-through of all running virtual machines on your Windows PC. Again, we will be paying attention to the ever-convenient Windows Powershell command-line interface to finalize this process. To get started, open Powershell first as an administrator. That will allow you to enter the forthcoming commands successfully.

After opening Powershell on the device, you will have to get started by entering a command. This command will allow you to enlist a list of all the different virtual machines running on Windows 10 concurrently. Check out the following and use it in your Command Prompt to continue.

wsl -l -v

Running the initial WSL command

Running the initial WSL command

After using that last command, Windows Powershell will return you with a list of different virtual machines running in the background. From here, we will have to check the status of each opened virtual machine and confirm which ones are functioning. If 2-3 processes actively show the status “Running,” we recommend you close all of them to check if the Vmmem high memory usage issue is fixed.

To close the virtual machine, you need to use the name of the process running. For instance, if Kali-Linux is being used, you can effortlessly employ the following command in Windows Powershell.

wsl -t kali-linux

The “-t” part stands for “terminate.” You should understand that you will enter the name of the process that’s specific to your PC. It may or may not be Kali-Linux, so don’t think the command above is set in stone and valid for all cases. For instance, you could have Ubuntu running on the desktop. In that case, the following command will be used.

wsl -t Ubuntu

In prevalent cases, that’s all there is to share about the Vvem high memory usage issue! Whenever you’re faced with a problem like this, make sure you know how to deal with it.

Conclusion

Windows 10 and Windows 11 are exceptionally regulated operating systems that comprise various processes. In most scenarios, these options grant the possibility of using a Windows PC optimally, making all possible things clearer to perceive. However, sometimes, these processes don’t work well for users and start springing more trouble than resolutions.

Worry not, however, because, in this guide, we have talked about some of the most effective ways to fix Vmmem’s high memory usage in Windows 10. You can start with a simple restart with a reasonable likelihood of getting the issue fixed and continue onto more involved fixes when things do not look to improve.

Понравилась статья? Поделить с друзьями:
  • Vmd драйвер для установки windows 10
  • Vm331 stimnt что это за программа в автозагрузке windows
  • Vli vl805 q6 windows 10 драйвер
  • Vli product string драйвер скачать windows 10
  • Vlc просит пароль для локальной сети windows 10