0

This is a copy of my original question.

On my PC, I have a process "vmmem", eating up to 1.6Gb of RAM, and regularly using my entire CPU usage. After some investigation, based on several wmic process where (processid=PROCID_HERE) get parentprocessid, I've found out that this is caused by a service, called "Hyper-V Host Compute Service".
Very naïvely, I've stopped that process (but as the RAM did not reduce, I decided to restart it again), resulting in the new version of "Blue Screen Of Death". Obviously I prefer not to see this screen :-)

I have Docker-Compose on my PC (hence the "Hyper-V" service), but apparently stopping the different containers also does not reduce the RAM usage.

Does anybody know what I can easily switch off/on in order to switch between Docker related development (needing the Docker containers) and other development (having enough spare RAM)?

Edit
My problem is that the process, called vmmem, takes a huge amount of memory, but I have no idea how this is built up: I can imagine some of it comes from the Docker process itself, some from the containers, again some others from the processes I'm running under the Docker environment, but when I stop the containers or my processes, this does not decrease the memory usage. Does anybody know what I can do in order to decrease the memory usage of the vmmem process?

Thanks in advance

1 Answer 1

1

WSL 2 is based on a lightweight Linux VM that is running using Hyper-V technologies. The vmmem process is the running VM itself as visible from the host PC. All WSL 2 distributions (including the Docker Desktop distribution) share the same VM.

The VM will shut down a few minutes after you stopped using WSL 2. To shut down WSL (both 1 & 2) immediately, you can run wsl --shutdown. This will immediately and without further prompts kill any and all WSL processes, so make sure you don’t have any critical tasks running in WSL.

Keep in mind that the Docker Desktop application itself will keep WSL 2 active while it is running, even when no containers are running. If you don’t need Docker, exit Docker Desktop. Maybe also disable starting it automatically at logon.


How to develop using Docker or otherwise is specific to whatever you are doing.

4
  • I'm sorry, I was a bit too fast to accept your answer (although it's quite useful): I've just done a wsl --shutdown and after a while (I don't know exactly what I did) I ended up again in a blue screen of death. Do you know the root cause for that problem?
    – Dominique
    Nov 16, 2022 at 13:25
  • No. Your Windows OS installation is most likely corrupted.
    – Daniel B
    Nov 16, 2022 at 13:40
  • You're right: I've run sfc /scannow and some system files were corrupted indeed.
    – Dominique
    Nov 16, 2022 at 14:04
  • It’s unlikely this will solve the problem, but good luck! There are various questions about Windows corruption on Super User that could help.
    – Daniel B
    Nov 16, 2022 at 14:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .