WSL 2 — How To Fix Download Speed
If you would have told me I’d be writing an article about how to fix download speed in WSL2 while developing in Windows I would have laughed! The thought of me turning to Windows for my dev environment was just never going to happen.
I had my trusty Macbook Pro for developing at work and my Ubuntu installation on my home PC. Developing on Windows is for noobs… Oh, how I was wrong.
Anyway moving on from that, moving to WSL2 on my Windows machine has been a surprisingly great experience. From the great integration with Visual Studio Code and being able to use Docker with ease. One thing that has been a pain in the ass has been my download speed. If you are having the same issue, keep reading I’ll explain the fix
[2 gnupg1 93.8 kB/556 kB 17%] 6266 B/s 2min 35s
Above is literally what the speed was when downloading the Speedtest CLI tool and here is what my speed should have been!
The Fix
There is a feature on some Network Adapters called Large Send Offload. This is enabled by default for both IPv4 and IPv6. It essentially blocks TCP from partitioning large data packets into smaller packets.
To disable this you need to configure the WSL vEthernet adapter (Also any adapter you are using, so docker ones too)
- Press the Windows Key and type “Control Panel” and hit enter
2. Click “Network and Internet”
3. Click “View network status and tasks”
4. Click “Change adapter settings”
5. Find the “vEthernet (WSL)” adapter and click properties
6. Click “configure” and open the advanced tab
Select “Large Send Offload Version 2 (IPv4)” and change the drop-down to disabled. To the same for “Large Send Offload Version 2 (IPv6)”.
Once this is done click “OK” and you are all done. You may experience a slight downtime in connection while this is saved.
Takeaway
With this internet issue out the way, I can carry on developing in Windows. Still can’t get used to saying that…
If this helped you, please support this article by giving a comment and a clap.
Over and out
Chris
Originally published at https://www.townsy.io on February 15, 2021.