When I started using WSL on Windows 11 I had slow network performance issues.
We're talking running speedtest-cli
and getting ~3 Mbps download speeds while my connection can reach 400 Mbps.
After searching online for a while and trying a variety of things I finally found a solution.
In %USERPROFILE%\.wslconfig
add the following:
[wsl2]
networkingMode=mirrored
With this fix applied I'm now getting ~400 Mbps download speeds in WSL, matching my native Windows performance.
I have a git
repository with 25k commits in it and 7k+ files.
Under Windows 11 using WSL, I noticed that git
operations were significantly slower compared to running them natively on Windows.
I have a script that I use to synchronize many branches that was taking forever to execute, but should have been relatively fast.
It also had trouble with line endings which caused issues when merging branches but reminded me of a setting I used to configure in my ~/.gitconfig
a very long time ago.
Given that git
configuration under Windows and WSL are separate, I had to update the ~/.gitconfig
file in my Linux environment with the following.
[core]
autocrlf = true
This immediately fixed my problem and git
was fast again.