docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.86k stars 291 forks source link

RAM usage is high #2052

Open akshaybabloo opened 6 years ago

akshaybabloo commented 6 years ago

I built an image from Dockerfile, used it and removed it - all of it. The RAM used by Docker.Service is more than 4GB sometimes even 8GB. This happens even if all the containers and images are empty. I even tried docker system prune but still no change in the RAM usage.

Expected behavior

After the containers are cleared the RAM should be minimum to none.

Actual behavior

There is no change in the RAM usage.

Information

Steps to reproduce the behavior

  1. Create an Ubuntu:18.04 image.
  2. Do some intensive process with it, say install Anaconda.
  3. Prune the system.

Update

After quitting Docker, Docker.Service disappears. Is there a way to clear the RAM instead of quitting the docker?

Update 2

I have also posted a question here -> https://stackoverflow.com/questions/50753417/docker-uses-memory-without-any-image

akshaybabloo commented 6 years ago

ping

rn commented 6 years ago

could you provide a dockerfile? The memory usage of the docker service has nothing to do with images etc. Those are kept inside a VM whose memory usage is not accounted to Docker.Service

rn commented 6 years ago

Also could you try the latest Edge release. There is something very spammy in your log files (from vpnkit) and that is handled by the service. So I can well believe that that might increase the memory usage

rn commented 6 years ago

Actually the logs are being spammed because you seem to have DEBUG set in the environment (probably system profile). This is clearly a bug in one of our components and I filed an internal issue. In the mean time could you unset/delete the DEBUG environment variable? If you need it, I think it is safe to set it in the User's environment (not the System profile).

Thanks

akshaybabloo commented 6 years ago

DEBUG value is actually set to 0, doesn't that means false?

rn commented 6 years ago

It is still set and unfortunately our code only checks for presence of the environment variable. The next edge update should have a fix.

docker-robott commented 6 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

akshaybabloo commented 6 years ago

Any update on this?

tgunness commented 5 years ago

/remove-lifecycle stale

tgunness commented 5 years ago

/lifecycle frozen

tgunness commented 5 years ago

My machine is exhibiting heavy mem usage as well. DEBUG env var does not exist.

image

image

voidomega commented 5 years ago

Hello everyone, I was able to solve the problem. Do the following: 1 Change to Linux containers

tolinux

2 Go into settings and decrease memory and disk usage as you prefer settingsdocker

3 save changes 4 back to windows containers

backwindows

5 See the Task Manager, all services are low in memory now.

resultmemory

andrewfinnell commented 5 years ago

I also experience this issue with the build before the one released today (< 07/31/2019). My Docker.Service will grow to use 22GB of memory until I am forced to restart it.