23 Aug 2025

Slow network under WSL

History / Edit / PDF / EPUB / BIB / 1 min read (~71 words)
wsl network performance

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.

23 Aug 2025

Slow git under WSL

History / Edit / PDF / EPUB / BIB / 1 min read (~133 words)
wsl git 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.