Using Docker Desktop (19.03.13) with 6 containers in Windows 10. Having 16GB RAM.
In docker stats
each container consumes 20-500 mb, all together cunsume ~1gb.
But in the Task Manager docker eats ~10gb and crashes from the lack of system memory.
How to check, what consumes so much memory in docker? And how to prevent this?
run your desktop docker it is probably working now with no crashes and exceptions. Show activity on this post. Click on the Start button 2)Then type services 3)search for Docker Desktop Services. 4)click on that 5)on the top left click on stop service and then click on start service.
Using Docker Desktop (19.03.13) with 6 containers in Windows 10. Having 16GB RAM. In docker stats each container consumes 20-500 mb, all together cunsume ~1gb. But in the Task Manager docker eats ~10gb and crashes from the lack of system memory.
Sorry, something went wrong. The short answer is docker for windows is terrible for Linux containers so don't use it. Switch to Linux OS if you want Linux docker. Sorry, something went wrong. I added more memory resources to docker service (in settings -> advanced) and it solved my problem.
By default, Docker Desktop is set to use half the number of processors available on the host machine. To increase processing power, set this to a higher number; to decrease, lower the number. Memory. By default, Docker Desktop is set to use 2 GB of your host’s memory.
Try to create a .wslconfig
file at the root of your User folder C:\Users\<my-user>
to adjust how much memory & processors Docker will use.
This is the content of the .wslconfig
file.
[wsl2]
memory=2GB # Limits VM memory in WSL 2 up to 2GB
processors=2# Makes the WSL 2 VM use two virtual processors
Then, restart the computer. You will find the Vemm
process will only take the amount of RAM you defined previously.
You can learn more here here
I guess you are using the new WSL 2 based engine, try switching docker engine back to Hyper-V by going opening docker settings
-> general
-> uncheck Use WSL 2 based Engine
.
To explain:
I noticed it started happening to me since WSL 2 engine was introduced, i automatically switched to it since it's a new engine; Memory issues started arising since then.
Restarting/closing docker did not free the memory and i noticed in task Manager Vemm
was the one eating all memory, so had to force close it (caused docker not to work).
Last thing i did was switching docker engine back to Hyper-V solved my high memory usage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With