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
rlwchang opened this issue Apr 10, 2018 · 82 comments
Closed

Extremely slow on Windows 10 #1936

rlwchang opened this issue Apr 10, 2018 · 82 comments

Comments

@rlwchang
Copy link

@rlwchang 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

This comment has been minimized.

Copy link

@tonymet 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

This comment has been minimized.

Copy link

@ghost 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

This comment has been minimized.

Copy link

@tonymet 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

This comment has been minimized.

Copy link

@laymain 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

This comment has been minimized.

Copy link

@77cc33 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

This comment has been minimized.

Copy link

@darron1217 darron1217 commented May 10, 2018

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

This comment has been minimized.

Copy link

@TheRealEdwardCullen TheRealEdwardCullen commented May 31, 2018

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

This comment has been minimized.

Copy link

@laymain 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

This comment has been minimized.

Copy link

@rwrz rwrz commented Jun 5, 2018

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

@plato1123

This comment has been minimized.

Copy link

@plato1123 plato1123 commented Jun 8, 2018

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

This comment has been minimized.

Copy link

@darron1217 darron1217 commented Jun 8, 2018

We may need a windows network guru...

@rlwchang

This comment has been minimized.

Copy link
Author

@rlwchang 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 Jun 8, 2018
@rlwchang

This comment has been minimized.

Copy link
Author

@rlwchang rlwchang commented Jun 8, 2018

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

@jasonmcboyd jasonmcboyd mentioned this issue Jun 20, 2018
2 of 2 tasks complete
@harutyunyan-vahe

This comment has been minimized.

Copy link

@harutyunyan-vahe harutyunyan-vahe commented Jun 24, 2018

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

@pieterwillaert

This comment has been minimized.

Copy link

@pieterwillaert pieterwillaert commented Jul 3, 2018

same issue here

@sadeghhp

This comment has been minimized.

Copy link

@sadeghhp sadeghhp commented Jul 4, 2018

very slow on every simple command!

@ihr-it-projekt

This comment has been minimized.

Copy link

@ihr-it-projekt 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

This comment has been minimized.

Copy link

@rwrz 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

This comment has been minimized.

Copy link

@darron1217 darron1217 commented Jul 5, 2018

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

@ihr-it-projekt

This comment has been minimized.

Copy link

@ihr-it-projekt ihr-it-projekt commented Jul 5, 2018

@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

This comment has been minimized.

Copy link

@kugimiya kugimiya commented Jul 23, 2018

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

This comment has been minimized.

Copy link

@laymain laymain commented Jul 23, 2018

@cirykpopeye

This comment has been minimized.

Copy link

@cirykpopeye cirykpopeye commented Mar 11, 2019

I can confirm that it's an issue in Windows only, since on the same machine Linux is super fast. Excluding vendor & node_modules folders fixes the issue for me but makes it a pain to maintain. Running Samsung 970 Pro NVMe SSD so should be plenty fast. We experience similar issues on Mac OS though.

@TrevorGertridge

This comment has been minimized.

Copy link

@TrevorGertridge TrevorGertridge commented Mar 11, 2019

Sorry for not responding faster -- was on a trip.
I'm not exactly sure what magic incantation made it work for me.

I have an Alienware R2 machine running Win 10 Pro on a quad core i7 at home.
We learned about Docker but for Linux at work, and last week I started to do some remedial studying about it to ramp up on a new project.

I was brushing up on it at home, and just ran into the slowness 1x for a few minutes.

Tricks I tried that might have helped (these may be obvious, but I'll list them):

  1. If you're using PowerShell, make sure you run it as an Administrator.
  2. There are subtle differences between regular PowerShell and PowerShell ISE. At work, we found that PS ISE doesn't work in all cases, so make sure you use plain PS in Admin mode.
  3. I tried doing the ipconfig clear trick a couple of times, but the problem persisted.
  4. I rebooted my computer 1x and the problem seemed to go away after, but it could have been from a combination of 1-4.

BUT, I think it's really the difference between PowerShell versions... but I could be wrong.
I'm at work right now, but I will add a comment here later telling you my Win OS version, Docker version etc as those might also provide clues.

Once I got it working at home, I was able to use Hyper-V to create Docker swarms, etc, as outlined in the Docker intro exercises in their online documentation.

I'm now in the midst of trying to reproduce the same thing here at work on my Win10 Pro workstation, and it mostly works, although I've have issues with CA certs, etc because I'm doing it in a corporate environment. However, there is documentation you can Google for that outlines how to fix that.

@ardalon

This comment has been minimized.

Copy link

@ardalon ardalon commented Mar 11, 2019

@rlwchang Have you tried turning off "Send usage statistics" under Settings -> General in the Docker Desktop GUI ? I went from 5+ seconds of waiting for a simple "docker images", "docker ps -a" to under 1 second! It seems the send usage statistics is enabled by default.

@kind-serge

This comment has been minimized.

Copy link

@kind-serge kind-serge commented Mar 11, 2019

In my case, I found that the slow response (~20 seconds) occurs every 30 seconds and has something to do with Active Directory. We have Azure AD, and docker works with no delays when I'm inside the corporate network. Once connected from outside the network, those delays occur.

Still digging, but I find a solution, I'll reply in this thread.


Update: nope, it's hopeless. #2131

@LBoraz

This comment has been minimized.

Copy link

@LBoraz LBoraz commented Mar 21, 2019

super slow here too (windows 10). Disabling the anti-virus is not a solution

@ardalon

This comment has been minimized.

Copy link

@ardalon ardalon commented Mar 21, 2019

if it helps anyone, it wasnt just turning off stats reporting...it turned out to be the entire DesktopAuthority suite of services that was causing unusable performance. if you hook up procmon to see what is happening with these services enabled, theres just so much performance crippling activity

@jakubkeller

This comment has been minimized.

Copy link

@jakubkeller jakubkeller commented Apr 17, 2019

@lucasvanlierop

This comment has been minimized.

Copy link

@lucasvanlierop lucasvanlierop commented Apr 18, 2019

@jakubkeller Windows is fine, but Docker on Windows is horror, I switched back to Linux after a while.

@programadriano

This comment has been minimized.

Copy link

@programadriano programadriano commented Apr 24, 2019

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

@dwaffe

This comment has been minimized.

Copy link

@dwaffe dwaffe commented May 12, 2019

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

@JoseFrankGeraldino

This comment has been minimized.

Copy link

@JoseFrankGeraldino JoseFrankGeraldino commented May 14, 2019

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

This comment has been minimized.

Copy link

@LiamKarlMitchell LiamKarlMitchell commented Jun 18, 2019

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

@pabloyokese

This comment has been minimized.

Copy link

@pabloyokese pabloyokese commented Jul 3, 2019

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

This comment has been minimized.

Copy link

@robertdumitrescu robertdumitrescu commented Jul 11, 2019

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

This comment has been minimized.

Copy link

@anhtata 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

This comment has been minimized.

Copy link

@eric-silverw-com eric-silverw-com commented Aug 15, 2019

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

This comment has been minimized.

Copy link

@redhead 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.

@FellowsDevel

This comment has been minimized.

Copy link

@FellowsDevel FellowsDevel 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

This comment has been minimized.

Copy link

@hiepxanh hiepxanh commented Dec 5, 2019

@FellowsDevel

This comment has been minimized.

Copy link

@FellowsDevel FellowsDevel 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

This comment has been minimized.

Copy link

@billgeek billgeek commented Dec 12, 2019

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

This comment has been minimized.

Copy link

@flindby 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

This comment has been minimized.

Copy link

@mbamarante mbamarante commented Mar 4, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.