-
Notifications
You must be signed in to change notification settings - Fork 832
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
apt-get update/upgrade/install downloads packages at unacceptably slow speeds. #2477
Comments
If there is nothing meaningful in the environment and you don't mind completely destroying it, try the following in an elevated command prompt:
See if the problem persists if you completely redeploy the environment. |
@RalphORama - Thanks for your post. We are aware that WSL networking perf is not at par with native Linux, but should not be unbearable. There are plans to improve the WSL n/w perf. I am not sure if uninstall/reinstalling will change much here for you. |
Yeah WSL might not be on par with Real Linux, but we're talking Phoronix-style quibbling not mass degradation. I get awful @RalphORama
If you see an orders-of-magnitude difference between Windows and WSL, report back because that would be good to know; it is always possible there is something unique going on with your setup. |
I found that Windows Defender absolutely murders performance in WSL, especially tools like apt-get. |
this. Windows Defender really messes with I/O actions in WSL, not just with |
It does. But keep in mind, in the OP this was the 'Get' phase, which is literally just a |
I reinstalled WSL as @gravcat suggested, and installed Update: Creating a firewall rule and switching to OpenDNS had no effect on apt's download speeds. |
@therealkenc - Thanks for the repro steps. I tracked this down to a directory rename failing due something that has a handle open to one of the directory's children. Unfortunately this is an NTFS limitation that I can't think of a workaround without NTFS supporting posix-style rename. I know they were looking at that at some point, but I'm not sure of the status. |
I am also experiencing this issue, did the solution suggested by @gravcat work for anyone? |
Just turn off Windows Defender Real-time protection. Add WSL folder and apt process in exclusion list will not work. You should to completely disable real-time protection, reboot and will see how fast it will be |
I no longer have this issue, it appears that I just lost the repo mirror
lotto when I did the dist-upgrade
…On Sat, Jan 27, 2018 at 9:25 AM, leandrw ***@***.***> wrote:
Just turn off Windows Defender Real-time protection.
Add WSL folder and apt process in exclusion list will not work.
You should to completely disable real-time protection, reboot and will see
how fast it will be
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2477 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ARdVlnwMEBb5_joxJ8evpNNunyCRSYR8ks5tO03pgaJpZM4PQqnc>
.
|
same here. Using ESET Internet Security 11. no help disable anti-virus. |
@DarthSpock - unfortunately I think the posix-style rename work the ntfs team did doesn't handle the case where a directory has children with open handles. Adding @SvenGroot to confirm. |
@benhillis
Like this |
I can confirm, this is slow as hell. For me the speed is 219 B/s, while my internet speed on windows is 24mbps |
I can confirm as well, the speed has dropped down significantly especially when downloading many things |
Has anyone found a fix? getting speeds of 40 kB/s |
I'm having the same problem! >_< |
Ubuntu on WSL uses the Ubuntu's main archive mirror, which may not be the fastest option depending on your location. Could those who are having this issue try choosing a local mirror from https://launchpad.net/ubuntu/+archivemirrors (tip: most countries have a mirror like us.archive.ubuntu.com, so you can try that for your country before scouring the list), updating /etc/apt/sources.list to use that mirror instead of archive.ubuntu.com, and see if that improves your download speed? Make sure you run You can use sed to make the change. For example, to change from archive.ubuntu.com to us.archive.ubuntu.com: |
Running Synaptic on Kali goes rather fast. Faster than normal |
You can confirm whether the variable is your Ubuntu mirror by testing against
|
@SvenGroot tks man, it´s way better now |
Turning off Windows Defender Realtime protection did the trick. All other options did not work. |
I'm having the same problems as well. Installed WSL only a month or so ago, and any time I try to install/update using apt-get I first get abysmal speeds (100s of Bps to KBps on a 75 Mbps connection) and then everything comes to a screeching halt, at which point I kill it. Windows 10.0.16299 (and Defender is turned off). |
Tried this comment by @aqeebimtiaz a few days back, and this has certainly made things significantly better, though still not as fast as if i was outside WSL. But for code editing, the speed performance makes no difference, only when needing to download huge files. |
Haven't read all the responses to see how many people have tried this but the mirrors generated from this tool fixed the issue for me |
Just turn off windows defender real-time protection. It's work for me. |
I fixed it by running this to PowerShell Admin:
This basically opens the interface for WSL per this issue comment: #4585#issuecomment-610061194_ No turning off of windows defender necessary. |
@anvillasoto Wow, thank you! That actually works for me! I just tested it on an outdated instance of WSL. It's downloading packages at full speed now. 👍🏻 New-NetFirewallRule -DisplayName WSL -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow |
#2477 (comment) by @Austin76016 worked, I guess. Can anyone tell me this equalent for Kali-Linux? or how does this work? |
here is website you can use find internnet speed https://www.internetmeter.net/,if you want to find your ping them go to this link |
1 similar comment
here is website you can use find internnet speed https://www.internetmeter.net/,if you want to find your ping them go to this link |
Excluding the |
@Aymane11 I actually have a PowerShell script I use to do this automatically for all WSL instances. You will need an escalated PowerShell instance (Run as Admin).
|
I have narrowed the docker issue as well now. Seems to be a bottleneck due to using a WiFi connection. Switching to a wired connection and WSL2 -> Docker CE containers for tensorflow with GPU support will now download using the entire connection. No idea why that is. Haven't been able to find any info on why docker has issues with wifi. |
@SvenGroot Solution works for me, Also remember to change security mirrors too, So completed command will be like: |
Work like a charm. Hate firewall just doing this. |
i copied the
this solved my kali issue, I had to now I dunno how the ubuntu got generated, ubuntu was doing the same issue as kali, probably wsl --shutdown solved it?
|
I realized the issue for me was that antivirus ESET was blocking the traffic for WSL Ubuntu. |
Hi folks, we have put out a new update that aims to address networking issues in WSL. In your More info on this release and the changes can be found here in the blog post. Please note: You need to be on a Windows Insiders version to use the new networking settings (Any channel of Windows Insiders will do, including release preview). If you see the "These are not supported" messages it means that your current Windows version doesn't have support, and you will need to upgrade. These features will eventually be coming to Windows 11 22H2. |
Thanks! helped me too with ESET Internet Security |
Hi ! Please try the latest networking features that we've added in WSL. Those should greatly improve performance. If the issue still remains, please reopen this issue. |
Changing nameservers
Doesn't work for me. |
Your Windows build number: Microsoft Windows [Version 10.0.15063]
What you're doing and what's happening:
sudo apt-get update && sudo apt-get upgrade -y
downloads packages at less that 100 kB/s.What's wrong / what should be happening instead:
apt
should fetch packages much faster. My internet speed is 100 down / 10 up, on a bare-metal Linux installation or VirtualBox instance,apt
is blazing fast. Packages are downloaded at upwards of 1024 kB/s.Strace of the failing command, if applicable: n/a
The text was updated successfully, but these errors were encountered: