Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extremely slow on Windows 10 #1936

Closed
3 tasks done
rlwchang opened this issue Apr 10, 2018 · 92 comments
Closed
3 tasks done

Extremely slow on Windows 10 #1936

rlwchang opened this issue Apr 10, 2018 · 92 comments

Comments

@rlwchang
Copy link

rlwchang commented Apr 10, 2018

Please, check https://docs.docker.com/docker-for-win/troubleshoot/.
Issues without logs and details cannot be debugged, and will be closed.

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have submitted Diagnostics
  • I have included the Diagnostics ID in this Issue
  • Windows Version: Windows 10 Pro
  • Docker for Windows Version: 10.03.0-ce

Expected behavior

Be able to run all the commands with relatively good response time.

Actual behavior

The response times are pretty awful. They are on at least 25x slower than the Docker Toolbox.

Information

Diagnostic ID: E8F1D8B2-B010-4076-BF6D-E78E749871E8/2018-04-10_13-17-34

Currently running Windows 10 Pro, with 32GB memory, 1TB SSD, Intel quad-core at 2.8GHz (not hyperthreading processes), so pretty good hardware.

Using Docker for Windows with Hyper-V enabled.
Equally slow on Windows and Linux Containers.

Reset to default and failed to achieve any difference.

Equally slow with cmd, powershell, and git bash terminals.

Settings for Docker increased to 10GB memory and 4 CPU cores with no improvement.

Already up to date, so updating won't help.

Steps to reproduce the behavior

  1. ... Download Docker for Windows
  2. ... Use it and cry
@tonymet
Copy link

tonymet commented Apr 10, 2018

general advice for development

Here are directories to exclude

  • development project directories that contain .git repos or node_modules, etc
  • docker image directories
  • anything with thousdands of files

What services to configure exclusions on

Do this and you will notice Docker & WSL will be 100x faster

@ghost
Copy link

ghost commented Apr 13, 2018

I am seeing exactly the same thing, I have done as suggested and excluded all the relevant directories from Windows Defender. Is there anything else I should be looking at?

@tonymet
Copy link

tonymet commented Apr 15, 2018

@campbellm Next step would be to install procmon https://docs.microsoft.com/en-us/sysinternals/downloads/procmon . That gives detailed process activity listing all system calls and open files. That's how I found the above solutions. You may have another background process , or the exclusions above may not have been configured properly

@laymain
Copy link

laymain commented Apr 18, 2018

I have the same issue here, I've added my development folders to the Windows Defender exclusion list without any performance improvement.
I've launched procmon and found a relevant event:

Process Name Duration Operation Path Result Detail
docker.exe 67.8090678 CreateFile \\MY_DOMAIN\PIPE\samr BAD NETWORK PATH Desired Access: Generic Read/Write, Disposition: Open, Options: , Attributes: n/a, ShareMode: Read, Write, AllocationSize: n/a

Is that a Docker network issue?

@77cc33
Copy link

77cc33 commented May 10, 2018

Try to disable windows defender at all, just for testing. You can use Windows Shutup 10 Tool to do this for sure.

@darron1217
Copy link

I always disable my vaccine softwares when I run docker.
But it's extremely slow even there's no program running on my desktop.

I've assigned more CPU, RAM, SWAP spaces for moby linux, but it never gets better..

I guess it's not the problem of storage access. I think it's related to docker's virtual network accessing speed

@TheRealEdwardCullen
Copy link

Have been encountering this on a Windows 10 Enterprise (1709) laptop.

I strongly suspect that it's related to the use of VPN.

I'm using Citrix NetScalar Gateway. The performance of "docker ps" is abysmal when I'm connected, but fine when not.

I'm also encountering "No such container" error when trying to stop a container that is running (visible in ps), though whether that's directly related or not, I'm not sure; I don't know enough about the internals, but it all seems communication-related...

@laymain
Copy link

laymain commented Jun 1, 2018

I tried to:

  • Remove Docker
  • Remove every remaining Docker configuration files
  • Remove Hyper-V
  • Remove all remaining network cards linked to Docker/Hyper-V
  • Reinstall Hyper-V
  • Reinstall Docker

without any improvement...

I ended by formatting and reinstalling Windows, everything runs smoothly now.

@rwrz
Copy link

rwrz commented Jun 5, 2018

I disabled Windows defender and it help a lot. But the network between containers seems slow... any ideas?

@plato1123
Copy link

I'm in the same boat, I'd love to hear some tweaks to make docker toolbox run better on Win10. Who's got some tricks? edit: Disabling windows defender seems to help a little but otherwise I haven't found much

@darron1217
Copy link

We may need a windows network guru...

@rlwchang
Copy link
Author

rlwchang commented Jun 8, 2018

I did something similar to what @laymain did. For me, I somehow had a faulty copy of Hyper-V. It was slow because it straight up wasn't working. In the end, I found out that when Hyper-V has an issue, Docker installs a bunch of weird things and sets your environment variables. I ended up:

  1. Uninstalling Docker.
  2. Removing all Docker artifacts using Windows search.
  3. Clearing all Docker related Environment Variables.
  4. Reinstalling Hyper-V (just turn it off and back on).
  5. Reinstalling Docker (with a fresh copy, just in case).

Now it works just fine, so that might be worth a short. I did not have to tamper with any antivirus or firewall things.

@rlwchang rlwchang closed this as completed Jun 8, 2018
@rlwchang
Copy link
Author

rlwchang commented Jun 8, 2018

Feel free to reopen if it doesn't help, but my issue was solved.

@harutyunyan-vahe
Copy link

Same problem, it is working very very very slow, please fix it

@pieterwillaert
Copy link

same issue here

@sadeghhp
Copy link

sadeghhp commented Jul 4, 2018

very slow on every simple command!

@ihr-it-projekt
Copy link

ihr-it-projekt commented Jul 5, 2018

very slow. i use a simple php docker image, create a simple php file with an echo and thy need 20 sec to execute on command line like: "php test.php"

Update

After uninstallation and new install, everything work expected for me.

@rwrz
Copy link

rwrz commented Jul 5, 2018

Lol, I'm complaining of 7 seconds to start an app... well, I changed my vendor/node_modules directory to a non-mounted volume, and now is 2 seconds. Acceptable time for a daily work. But virtualbox was still faster.... maybe with LCOW it will be better.

@darron1217
Copy link

Fresh install never helped in my case...
I tried it on 2 different computer (laptop & desktop)

@ihr-it-projekt
Copy link

@rwrz I can confirm. I copy my project files via rsync into my docker container. This is much faster then work on shared folders. This is a winows docker filesharing problem.

@kugimiya
Copy link

Same problem, it is working extremely slow, please fix it.
Btw, thats only on Windows, at the same PC, but on Linux, Docker works extremely fast. I think thats HyperV issue, cause Docker works in HyperV virtual machine. So, will Docker works with vagrant at windows? VirtualBox looks faster than HyperV.

@laymain
Copy link

laymain commented Jul 23, 2018

@kugimiya You should try @hermanvantriest's workaround

@programadriano
Copy link

I need to restart everytime that I need to use docker build

@dwaffe
Copy link

dwaffe commented May 12, 2019

I solved my problem with slow docker by using docker-sync. Response times back to normal

@JoseFrankGeraldino
Copy link

I still struggling with this and recomendation with running ipconfig /flushdns helped me. So I think it's mostly network releated.
EDIT: it helped once but not working anymore - maybe it was a coincidence

Not a coincidence, that's the solution that worked for me. Thanks!

@LiamKarlMitchell
Copy link

So is this resolved, or are we all waiting for WSL improvements?

@pabloyokese
Copy link

I still struggling with this and recomendation with running ipconfig /flushdns helped me. So I think it's mostly network releated.
EDIT: it helped once but not working anymore - maybe it was a coincidence

Not a coincidence, that's the solution that worked for me. Thanks!

this also works for me

@robertdumitrescu
Copy link

So is this resolved, or are we all waiting for WSL improvements?

Is resolved via hacks. This should be closed when WSL improvements are done.

@anhtata
Copy link

anhtata commented Jul 30, 2019

I'm developing a PHP project on docker with image centos host apache 2. Process a page very slow.

After tried all your above suggestions and after I found when I turn on debug from VsCode. It run so fast fast. Surprised me!

  1. Disable Antivius / Add process exclusive on window defender
  2. Re install docker
  3. Remove ipv6 of card network windows
  4. Start container with disabled ipv6
  5. Setting xdebug with remote host local
  6. Turn on debug of VsCode

Thanks all Guys

@eric-silverw-com
Copy link

Another thing to check for is active VPN adapters. Go into Control Panel\All Control Panel Items\Network Connections and disable any VPN adapters you aren't using.

@redhead
Copy link

redhead commented Nov 6, 2019

I want to confirm that using a different DNS server (e.g. 8.8.8.8 or 8.8.4.4) worked to resolve the slow response of docker commands.

@ghost
Copy link

ghost commented Dec 4, 2019

Hey guys, I make it happens by removing all IPV6 support and NetBIOS from all network interfaces and now Docker responds almost instantly!

@hiepxanh
Copy link

hiepxanh commented Dec 5, 2019 via email

@ghost
Copy link

ghost commented Dec 5, 2019

can you make a detail instruction? Vào Th 4, 4 thg 12, 2019 vào lúc 23:27 André Fellows < notifications@github.com> đã viết:

Hey guys, I make it happens by removing all IPV6 support and NetBIOS from all network interfaces and now Docker responds almost instantly! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1936?email_source=notifications&email_token=AEBPJ3TMVMRCZSDYLTPSHQLQW7LANA5CNFSM4EZ32OV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF5THCI#issuecomment-561722249>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEBPJ3WPF5QCHYZHFQAPJMLQW7LANANCNFSM4EZ32OVQ .

Sure I do @hiepxanh!

On Windows 10:
1 - Right click your network icon an click "Open Network & Internet Settings"
2 - Click "Change adapter options" under "Change your network settings" heading
3 - For each active (enabled) adapter do this:
3.1 - Right click the adapter and click "Properties"
3.2 - Uncheck "QoS Packet Scheduler" (maybe this is unnecessary)
3.3 - Uncheck "Internet Protocol Version 6 (TCP/IPv6)"
3.4 - Select "Internet Protocol Version 4 (TCP/IPv4)" and click "Properties"
3.5 - Click "Advanced"
3.6 - Select "WINS" tab
3.7 - Select "Disable NetBIOS over TCP/IP" radio button and click ok

Reboot your computer and verify.

I did this yesterday and Docker become very responsive in Powershell and Command prompt. Inside WSL Docker was always faster.
But today morning as I came to work Docker get lazy again. But as soon as I right click the Docker-desktop icon, it gets faster again. Perhaps this was due my computer spent the night idle and to save memory the process went to sleep or swapped out.

I hope this works for you!
Best regards!

Edit:
I noticed this doesn't solve completely the problem but helps a lot

Edit 2:
For unknown reason, the vEthernet (Default Switch) appeared with IPv6 enabled again. I did the suggested modifications and Docker become fast again

Edit 3:
Unfortunately docker service become lazy to respond again. To speed it up respond I just unplug the network cable and "voila" back to speed again

@billgeek
Copy link

I have also been experiencing abysmal performance and found that, at least in my case, it was related to pending updates. (I suspect Windows Defender)

I was working this morning and everything was fine. Came home this evening and everything sucked. (docker ps -a took around 4 minutes to respond) I tried everything: Restarting, shutdown and "cold boot", dns flush, nothing helped to improve the performance.

As a last resort decided to try checking updates. Three brand new updates were pending (Defender Antivirus Definitions, .NET Framework cumulative updates and Windows cumulative updates) so I installed them, rebooted and now everything seems to be back to normal.

It is definitely also worth noting that this only happened when connected via VPN. Without the VPN the docker ps -a command returned near instantly. The moment a VPN connection is established, that command stops responding and takes ages to return anything.

In my particular case, it would seem that VPN and Windows Updates are somehow connected, most likely due to the Defender updates.

@flindby
Copy link

flindby commented Feb 22, 2020

For me, the problem disappears immediately when I just disconnect from my regular home WiFi.
I have tried everything with Windows Defender, but that has no effect on my machine.

@mbamarante
Copy link

I'm developing a PHP project on docker with image centos host apache 2. Process a page very slow.

After tried all your above suggestions and after I found when I turn on debug from VsCode. It run so fast fast. Surprised me!

  1. Disable Antivius / Add process exclusive on window defender
  2. Re install docker
  3. Remove ipv6 of card network windows
  4. Start container with disabled ipv6
  5. Setting xdebug with remote host local
  6. Turn on debug of VsCode

Thanks all Guys

Remove ipv6 of card network windows works for me.

@Elio-Shyti
Copy link

I am working with docker on win-10. Until before a week was everything working perfectly. Since the last week docker is extremely slow. I tried a lot of things, like uninstall and install again, restart etc. Nothing worked.
Coincidentally I changed from WiFi to LAN connection and at this moment it works again perfectly. I don't have any idea why is this happening but maybe it helps somebody to understand more.

@ayhaninal
Copy link

This is exactly because of [x] Send usage statistics. Uncheck this and run faster.

@silence48
Copy link

i can't get docker ps to respond on windows. It started when i ran docker-compose ps, and it didn't respond... I ran docker ps today before I fell asleep, 5 hours later, it is still stuck. very odd.

@bkline
Copy link

bkline commented Apr 11, 2020

We have a project whose complete test suite takes an hour on a MacBook running docker. On a comparable Windows 10 box the unit tests by themselves take over 15 hours (the Behat tests can't run at all, without hacking the scripts so they won't time out):

root@a50249cf7792:/var/www# time vendor/bin/blt tests:phpunit:run -vv
[Filesystem\FilesystemStack] mkdir ["/var/www/reports/phpunit"]
[Filesystem\FilesystemStack] touch ["/var/www/reports/phpunit/results.xml"]
[Testing\PHPUnit] Running PHPUnit  --log-junit /var/www/reports/phpunit/results.xml /var/www/docroot/modules/custom -v --configuration /var/www/phpunit.xml
[Testing\PHPUnit] Running /var/www/vendor/bin/phpunit --log-junit /var/www/reports/phpunit/results.xml /var/www/docroot/modules/custom -v --configuration /var/www/phpunit.xml in /var/www/docroot/modules/custom
PHPUnit 6.5.14 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.2.24-0ubuntu0.18.04.3
Configuration: /var/www/phpunit.xml

..........................................................        58 / 58 (100%)

Time: 50.57 minutes, Memory: 36.25MB

OK (58 tests, 300 assertions)
[Testing\PHPUnit] Done in 50:34
[Testing\PHPUnit] Running PHPUnit  --log-junit /var/www/reports/phpunit/results.xml /var/www/docroot/profiles/custom/cgov_site -v --configuration /var/www/phpunit.xml
[Testing\PHPUnit] Running /var/www/vendor/bin/phpunit --log-junit /var/www/reports/phpunit/results.xml /var/www/docroot/profiles/custom/cgov_site -v --configuration /var/www/phpunit.xml in /var/www/docroot/profiles/custom/cgov_site
PHPUnit 6.5.14 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.2.24-0ubuntu0.18.04.3
Configuration: /var/www/phpunit.xml

....................                                              20 / 20 (100%)

Time: 14.36 hours, Memory: 10.00MB

OK (20 tests, 598 assertions)
[Testing\PHPUnit] Done in 14:21:58
15:12:34 total time elapsed.

real    912m34.451s
user    41m17.885s
sys     16m3.070s

@randre70
Copy link

If your issue is related to windows 10 and using a wifi adapter, try to disable all bridge protocols in the the advanced settings of your wifi adapter. Reference: https://superuser.com/a/540885
Afterwards "docker version" responds immediately.

@jakubkeller

This comment has been minimized.

@andiramuttakim
Copy link

andiramuttakim commented Apr 16, 2020

I have this problem since last month, trying to disable ipv6 and netbios from all network, re-install docker, but no luck.

I end up using docker via WSL.

Weird thing is, I've installed docker for windows in 4 machines, but only one that has problem.

@ads90
Copy link

ads90 commented Jun 12, 2020

for me issue was when i have onedrive syncing at same folder stopping onedrive make it 100X faster

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

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

@docker docker locked and limited conversation to collaborators Jul 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests