DEV Community

loading...
Cover image for vmmen process consuming too much memory (Docker Desktop)

vmmen process consuming too much memory (Docker Desktop)

tallesl profile image Talles L ・1 min read

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:

Discussion (6)

Collapse
lucagrandicelli profile image
Luca Grandicelli

Yep, the memory cap did the trick for me. Without it it's almost impossible to develop on WSL2+Docker.
gist.github.com/lucagrandicelli/65...

Collapse
greenroommate profile image
Haris Secic

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.

Collapse
lucagrandicelli profile image
Luca Grandicelli

Because, in my opinion, as soon as you start debugging and/or using multi-thread operations, the performances quickly go down. However, of course that's not "impossible", but i managed installing the Docker engine directyly onto the Ubuntu installation under WSL2.

Thread Thread
greenroommate profile image
Haris Secic

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

Thread Thread
lucagrandicelli profile image
Luca Grandicelli

Yep, it's a matter of RAM eating that in my case slows down everything (Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz 3.00 GHz 16GB RAM). I think the docker deamon was roughly higher 98% consuption. Anyway, this thread (github.com/microsoft/WSL/issues/4166) exposes very well others' issues like this and i'm not sure if there's an official fix at the moment. However, /w 48GB RAM you have enough room to spare.

Thread Thread
greenroommate profile image
Haris Secic

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

Forem Open with the Forem app