Cant stop Docker/Vmmem from running
Asked Answered
D

3

6

not so long ago I started to practice with writing EOS smart contracts on my windows 10 computer. For this I needed to install among others, a Linux subsystem for Windows and Docker. In the last couple of days I noticed some pretty significant performance issues, when looking for the perpetrator in my task manager I came across Vmmem using up 1.8 GB of ram (which is quite a lot considering I have only 8GB on my laptop):Task Manager

I Googled around some and figured out that this program handles virtual machines and such, and with that Docker. I don't have Docker Desktop or Ubuntu opened at the time of this screenshot, turned off the setting "Start Docker when you log in" and restarted my computer, but still this program is hogging up my RAM. As you may understand, it isn't worth it for me to keep this running in the background considering this EOS Development is a side-thing for me, hence I don't need to use Docker often. I would deem it a shame if I had to give up on this 'hobby' for performance issues so any help would be appreciated.

Duet answered 15/5, 2021 at 21:53 Comment(4)
You may find the answer here github.com/microsoft/WSL/issues/4166#issuecomment-526725261Sholes
@Sholes oh yeah that could work, any recommendations on the amount of ram I should set aside for this?Duet
Not really. I think you should align that with your use case and available resources.Sholes
This answers: superuser.com/a/1600751/249349Clerical
L
16

If your Docker is running on WSL, you can take back the RAM by terminating all the running distributions with command:

wsl --shutdown
Lymphosarcoma answered 12/6, 2021 at 6:15 Comment(0)
D
2

As @Matze suggested, I made a .wslconfig file in my home directory restricting the memory usage, which solved the problem.

Duet answered 15/5, 2021 at 22:48 Comment(0)
K
0

You can paste these commands here:

@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

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

Kosak answered 25/8, 2022 at 6:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.