DEV Community

Cover image for vmmen process consuming too much memory (Docker Desktop)
Talles L
Talles L

Posted on

vmmen process consuming too much memory (Docker Desktop)

Clean Docker Desktop install, starts WSL 2, no container running. Let's check the memory usage:

t

Ouch, that's too much for having (literally) nothing running. I don't know why it eats so much RAM, but there's a quick fix.

Create the file C:\Users\<username>\.wslconfig like the example below:



[wsl2]
processors=1
memory=1GB


Enter fullscreen mode Exit fullscreen mode

Run wsl --shutdown from a terminal, try it again, and there you have it:

In the meanwhile I suggest you to stay tuned to this issue, hopefully there will be a proper fix in the future.

P.S.:

Even when limiting the memory, vmmen still hungry, when set to 512MB I get an error:

Top comments (9)

 
_hs_ profile image
HS

Again, I don't have such issues, performance stays consistent but eats ram which is different from what you get. Question is how much ram and what CPU you have? I have Ryzen 1700 with 48GB ram which in turn uses about 2GB for docker alone. On the other hand messaging systems based on Apache Bookkeeper and so cause 2GB ram more to be used so it's not about docker in my case. Running such system with SSO like KeyCloak 900mb ram, database about 2GB as well and IntelliJ + application I build is something to excpect require more than 16GB total ram for the system. It will compensate on good SSD using its space instead of ram but if you want to run those things all at once at least 32GB should be in the system for Windows. So I guess you could check out how much do containers actually use in recommended cases

Collapse
 
_hs_ profile image
HS

I see it does eat memory but I have no need for memory cap. In my case it does take a bit too much on start but keeps running anyways. Not sure why would it be "almost impossible" to develop without it. The issue I'm having is horrible port management where it locks the port but windows shows no app using it sp basically it reserves the port on next system boot. Just horrible and it's probably just Windows related.

 
_hs_ profile image
HS

Ahh yeah 16GB is what I had for normal usage. I actually bought 32GB when I started working from home to avoid bottlenecks as I ran too many things at once and company didn't feel like testing in the cloud for money haha

Thread Thread
 
joaovictorvp profile image
João Victor VP - N

What's worse is that even with 32GB I still experience some memory issues, it can easily start consuming 70-80% of system RAM with about 8 containers on my computer counting the VS instance

Collapse
 
imoore profile image
Ian Moore

I know this is an old article but still a great help as the fix has worked for me to

Collapse
 
unreality23 profile image
Vaidotas

I had same issue with docker that it would eat up over 5gb ram, and this solution so far is the only one which ever worked. Thanks op! Great job!