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

WSL2 - Very slow download speed when using VPN (Global Protect) #5638

Closed
Andy9822 opened this issue Jul 23, 2020 · 6 comments
Closed

WSL2 - Very slow download speed when using VPN (Global Protect) #5638

Andy9822 opened this issue Jul 23, 2020 · 6 comments
Labels

Comments

@Andy9822
Copy link

Andy9822 commented Jul 23, 2020

[SOLVED]
Solution in #4698
TLDR: sudo ip link set dev eth0 mtu 1400 just fixed the problem like magic

Original problem:
Hey everyone,
I decided to give WSL2 a chance again and the setup was running so well... until I connected to my job's VPN.

I connected in Windows via the Global Protect client to the VPN and the WSL2 was still working fine, but then I realized my npm install was ridiculously slow, it was taking more than 30s when I decided to abort it.
It was at that moment that I ran speedtest:

  Speedtest by Ookla

     Server: Caxias Online - Duque De Caxias (id = 27842)
        ISP: Globo Comunicacao e Participacoes SA
    Latency:    34.39 ms   (0.30 ms jitter)
   Download:     3.01 Mbps (data used: 3.9 MB)
     Upload:    94.84 Mbps (data used: 101.2 MB)
Packet Loss:    98.1%

The fact is that when it wasn't connected to the VPN I get ~208mbps and now it varies between 0.8 and 5mbps

I've been looking in the issues and I found some problems related to VPN but mostly about not receiving internet or not detecting the virtual host, not specifically about slow internet connection.

Valid to mention that only the download speed is awful, the upload speed remains in 95mbps

Edit: I've been running speed tests while I was writing this issue and I realized that some tests really gave me the expected download speed, but with a ridiculous high packet loss. And then in the next 1 or 2 tests it fell to ~3mbps again.

Speedtest by Ookla

     Server: AFINET - Duque de Caxias (id = 22448)
        ISP: Globo Comunicacao e Participacoes SA
    Latency:    33.53 ms   (0.98 ms jitter)
   Download:   199.97 Mbps (data used: 210.4 MB)
     Upload:    94.83 Mbps (data used: 127.6 MB)
Packet Loss:    97.6%
@therealkenc
Copy link
Collaborator

This is a hair from dupe #4901, but can hold this open as a separate LZ on rationale "buh only happens when I start my third-party VPN software". Academically the same in the sense there is no way to locally reproduce. You might try some of things folks are exploring over there with large send offload etc.

gave me the expected download speed, but with a ridiculous high packet loss

FWIW I suspect but can't prove there is something to that which is actionable.

@illera88
Copy link

Same problem for me when connected to a VPN @therealkenc

@Andy9822
Copy link
Author

I've been talking with some coworkers and I found 2 of them who actually use or used WSL with the same VPN and didn't have this problem.
So it doesn't seem something related to specific third party software

@Andy9822
Copy link
Author

Hello, I need to update this thread because I was on vacation this last month and I found out that the problem did not occur at my beach house.

I was using my laptop (originally when I wrote the issue I was using my desktop) and I decided to test it and I realized that the download speed was completely fine. I've just arrived and with my home internet it downs to ~1mbps. So it seems to be related with the modem, not the VPN tool or anything. The way WSL works with Network seems to be flawed.

The modem I have is the original and my Internet Provided gave it to me, so it has not been modified for me or anything.
@therealkenc should I open some port or configure something in my modem's config?

@therealkenc
Copy link
Collaborator

therealkenc commented Feb 17, 2021

@therealkenc should I open some port or configure something in my modem's config?

Not that I could tell you first hand, although there are some rain dances over in #4901 that seems to help for some people in some scenarios (which might or might not match yours). Also there is some inconclusive evidence fiddling the MTU so they don't fragment for example (at random) #4698 (message) might help.

@Andy9822
Copy link
Author

Hey @therealkenc, thanks for the message and help.

The sudo ip link set dev eth0 mtu 1400 solution just fixed the problem like magic, now I can finally work within WSL :)

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

No branches or pull requests

3 participants