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
Very slow network speed on WSL2 #4901
Comments
|
Same here. Especially upload speed was drastically reduced - 36.61 -> 3.85 Mbit/s |
|
Hi, same here. My download was drastrically reduced of 200Mbit/s to 2 Mbit/s. Is there a solution? |
|
I'm hitting this issue, as well. Very frustrating. |
|
Edit: After several reboots and adding the related folders as exceptions in Windows Defender as @jituanlin 's referred blog pointed out, and then tried removing the exceptions because I wanted to check which folder exception actually helped (so eventually theoretically equivalent to reboots-only, but who knows?), now in Also, the command Old comment:
Cheers |
|
After follow this blog |
|
Same here. Getting about 7Mbit/s on WSL2 and 30+ in Windows. Disabling Defender also made no difference for me either. |
|
Same here :
WSL 2 :
|
|
Oddly, I'm getting decent results from the Speedtest results...
|
|
Same issue here, dire network speed in WSL2. Performance with Linux or WSL is fine. |
|
Same here, Windows is about 60Mbps vs WSL2 14kbps !!!! |
|
I'm seeing 249.94mbps down / 15.42mpbs up on Windows, which is pretty much what I expect from my ISP. On WSL2, But
I'm on |
|
Just FYI. I have experienced extremely slow network speed as well, but it seems to be a temporary issue. Perhaps a local network issue? Right now in WSL 1 (2004 not insider) I get: |
|
I was having a similar issue and found that switching from Wifi to Ethernet helped. Ethernet NIC is a "Killer E2500 Gigabit" |
|
Hello friends, |
|
don't have the problem on surface pro x (arm64) |
|
It gets better... my speedtest today (Ethernet): Windows: |
|
Hi all, I got the latest Windows 10 ver 2004 update. Switching from WSL1 to WSL2. I have the similar slow issue like you all had. But not particularly on the internet, it's more on Windows to Ubuntu via localhost access Windows Version: 2004 I run php development in WSL with Ubuntu 18.04.4, I have apache2, php7.2 and MariaDB running very well on WSL1 During development, I usually tunnel to my server to load ElasticSearch/Postgresql data, the tunnel is listen on localhost with respective port numbers. I do not have connection problem when running in WSL1, the speed is tremendous fast. It's fast like the data is loading on my machine itself. But when I switch to WSL2, I notice the connection is extremely slow. The initial loading took like 5-7 secs. Then the page would rendered. The hostname is mapped to 127.0.0.1, I've tried mapped on WSL2 Ubuntu private IP, the results are the same - Slow. I've capture the video and sharing with you all. Here is the video running on WSL1 https://www.youtube.com/watch?v=tNFtUUd2sG4 What I did was wsl --set-version Ubuntu 2, to upgrade the current Ubuntu distro to WSL2. Here is the video of the same development site running on WSL 2 (Please look at left bottom status bar) https://www.youtube.com/watch?v=JFYgzMHf2RU I've tried the comments on this thread, no luck getting it load fast like WSL 1. Hopefully this can be fixed, I've switched back to WSL1 and the speed is back to normal. You may refer to the video below, the result is instance. |
|
Same for windows11 ws2 ubuntu, I used iperf3 within ubuntu and get <2 Mbps, while 1000Mbs in windows host. |
|
Same here. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
On my side connection to Python Pip is impossible (always timeout) because of this issue. I have tried several fixes all over this thread and others i found on the internet but none worked. It seems like the issue is exclusive to WIFI connection only on my side : |
|
Nothing was able to fix it for me until I replaced network adapter. Now I get full speed in WSL2 |
|
At my Windows 10 installation, there isn't any wsl adapter. I found a other article but it didn't helped. |
|
The issue still persists, very confusing indeed. |
|
Chiming in. I just switched to WSL2 to do work on a leveldb database which wasn't working on WSL1 (known unrelated issue, I guess). So WSL2 fixed the database issue, but introduced a network issue. I have a program that was sending up to 1000 json-rpc requests per second on the local lan form one machine to another. Once I installed WSL2, it dropped to about 50 per second. And the strange thing is, they come is waves rather than a steady trickle. It will dump 50 responses and then pause for a second, dump 50 more and pause for a second, etc. It's really strange. If I switch back to WSL1 the problem goes away and I am back to 1000 requests per second. |
|
@maxjf1 Resolves speed problem, but breaks resolve for my Arch WSL image ¯_(ツ)_/¯ have to manually set my router ip add in |
|
did anyone find a solid answer? i'm having this same problem and I literally tried every single commented method but the speed is still extremely low |
|
@Zerogoki00 What specific network adapter are you now using? |
|
So funnily enough, I changed my motherboard from ASUS to an MSI due to an unrelated problem, but I just noticed my WSL internet speeds are now matching the host PC speeds. |
I am now finding that the setting does not persist after reboot, which I should have figured. Still fixes the problem for me when steps are repeated. |
|
I don't have any WSL2 Adapter showing in my control panel |
I was not seen vEthernet (WSL) adapter in my control panel in windows too. I open my wsl and run |
|
I have max network speed in WSL2 but |
|
@Epskampie's answer worked for me!! |
|
I don't know if anyone else have this problem but I get decent speed in wsl (speedtest or git clone or git push) but when running a bash script the git clone and git push speed is very slow. Git clone (running this cmd inside bash script): 450 kB/s I've tried disabling IPv6 and tried different wifi networks and even wired network but the upload speed while running bash script stays at 30 kB/s |
|
Update: I temporarily solved the slow upload speed in WSL by clean installing Windows. Returning to a clean build restored the upload speed to match that of the host (previously it was ~20x slower). I was on the March 14, 2023—KB5023706 (OS Build 22621.1413) Windows Build with all features working as expected. However, last night Windows Update installed April 11, 2023—KB5025239 (OS Build 22621.1555), and my upload speeds have been cut by a factor of 10. Worse yet, when running the previously suggested commands to resolve issues for other users: my WSL now has no internet connectivity. Looking to see if removing the LCU will resolve my issue, but this is getting painful. Clearly Windows Updates are breaking WSL for users. |
I have the same problem and have no internet connectivity after I ran the commands above. Try to enable ipv6 & the large packet & reboot then the connectivity back . But the low speed problem is still not solved. |
Instead of apt, try wget, curl or speed tests to test Internet speed in WSL. This ticket is for general network speed in WSL2, not just apt. If the issue is only in apt for you, it could be the mirror issue. Try changing the mirror and check. Switching between https and http in source list is also a way to test for mirror issue. If all mirrors are slow and issue is only in apt, maybe you can create another ticket for it. |
|
Everything I've found tells me this is a bug with WSL2 using a Wi-Fi adapter. I've not had a problem with wired ethernet. The only thing that fixed the Wi-Fi for me was sharing the internet connection. However, it does not persist. For those of you that found a fix using 'Internet Connection Sharing' but it does not persist across reboots, you can automate the fix when you spin up your WSL distro by adding the line below to your ~/.bashrc. Be sure to replace "Wi-Fi' with the name of your adapter (execute |
|
same for me (with apt, git and so) here on windows 11 with WSL2 (debian distro but has same issue on ubuntu as well) As last comments mentioned this, I'm also using a usb tp-link wifi adapter |
I'm on wired connection and its still giving me terrible speeds |













Windows build number:
10.0.19041.84Dist: Ubuntu 18.04 LTS
I just installed WSL2 on my home computer for the first time and something i notice that i don't see on my work computer is that WSL2 has dramatically lower network speed (
wgetorgit clonetested). Speeds on WSL seem to be about 10-20 kb/s wheras windows download speed seem to be correlating to my ISP spec of 100/10 Mbps or above.The text was updated successfully, but these errors were encountered: