Closed dennisameling closed 7 months ago
/dupe #4901
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.
Thanks for your report!
@therealkenc I saw #4901, but thought it wasn't the same issue as that issue is related to external networking (e.g. Speedtest.net). In my case, the external network is fast (>100Mbps) but the connection between Ubuntu and Windows is slow (~1Mbps). Do you think we should keep it together in #4901 (I'll add my case there then) or should this remain a separate ticket?
Yeah, it was a tough call because you're okay externally. Reasoning was that this one will likely only draw "slow for me too" posts, and it is better to keep those in one place. None of this is on you; there is no doubt you are seeing local networking slowness for an as yet unidentified reason (in the same sense that the peeps in #4901 are seeing slowness for as yet unknown reasons). But let's call it "different enough" de-dupe ya.
Slowness has been observed on localhost
too ref #5069.
Same here, I am running this on Surface Pro X, with WSL2 starting up Angular app and accessing it from GUI via browser 4.3 minutes to push through 9.5MB of data is not ideal. For me this is a showstopper as I can't have dev cycle where I wait for 5 minutes every time I click ctrl+s
@eldiablolives Have you been able to find a solution for this in the meantime? Just updated my WSL2 installation but the issue is still there 😞 I'm in the same boat as you, would love to have my dev workloads on the Surface Pro X but this is a showstopper indeed
UPDATE: as described in https://github.com/microsoft/WSL/issues/5069#issuecomment-622251239, it's possible to serve apps on 0.0.0.0, then look up the WSL2 IP address (e.g. 172.21.52.3) and use that to connect to the app. It's blazing fast that way (but have to check the WSL2 client IP every time WSL2 is restarted), so it definitely has something to do with connecting through localhost
. Very weird issue.
Speedtest is indeed much faster when connecting directly to the WSL2 IP instead of localhost
:
wsl command to get the IP address: ip addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'
+1
Unfortunately, the issue is still present in Windows 11 ARM64 beta. Just filed additional feedback using Feedback Hub: https://aka.ms/AAdaz7r
Really hoping that this will be resolved soon, as it's the final blocker for me to move my web development workflows to Windows on ARM 🤞🏼
I found another workaround in Windows 11: using the new WSL2 GUI functionality, I was able to install Firefox in Ubuntu (sudo apt install firefox
) and do everything in Firefox instead. That basically means that everything is running locally inside WSL2, so the localhost issue with slow speeds doesn't apply here 🎉
It's not perfect since there's no vGPU driver for arm64/Qualcomm yet, but it gets the job done for now 😊
Good news: this has been fixed in Windows 11 build 22449. This build is currently in the Dev channel (Windows 11 RTM is build 22000). It was mentioned specifically in the release notes of 22449 as well:
We did some work on WSL2 to help improve the performance and reliability of localhost relay.
Will leave this issue open for visibility 👍🏼
Wanted to point out that this is an issue even when adding your WSL2 IP to C:\Windows\drivers\etc\hosts with a custom domain.
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.19041.113] Device: Microsoft Surface Pro X (ARM64)
When trying to use WSL 2 (Ubuntu) to debug NodeJS applications, like Angular (e.g. with
ng serve
), network performance is very slow (~1Mbps). This results in a very sluggish experience with long loading times.Speeds from Ubuntu to external (internet) servers are absolutely fine:
In order to quantify my experience, I installed Docker in Ubuntu/WSL 2 and then ran https://hub.docker.com/r/linuxserver/librespeed to run a speedtest on my Windows computer against the Ubuntu/WSL 2 installation. The results:
I tried temporarily disabling Windows Defender, but that didn't make any difference unfortunately.
The network speed between Ubuntu/WSL 2 and Windows should be much higher than it is now. Please note that this was tested on the Surface Pro X, an ARM64 device. Not sure if the issue is ARM64-specific though.
some_command
is failing, then runstrace -o some_command.strace -f some_command some_args
, and link the contents ofsome_command.strace
in a gist here).N/A
I'm not sure where to start looking in order to troubleshoot this issue. More than willing to help troubleshooting, but if someone could give me some hints on where to start looking that'd be great 😃
Steps to reproduce
http://localhost
in Windows and start the speedtest. You'll notice the slow speed.ifconfig
in WSL2 and copy the IP address of eth0 (e.g. 172.24.216.50)http://172.24.216.50
. The speedtest should now be very fast.