Poor performance with WSL2 and Windows 11
matpil opened this issue · 9 comments
Windows Version
Microsoft Windows [Versione 10.0.22631.3447]
WSL Version
2.2.3.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
5.15.153.1-2
Distro Version
Ubuntu 22.04
Other Software
git version 2.39.2
Debian version 12.5
Repro Steps
fresh Debian installation
cloning repo git on native wsl2 fs
launch a "git pull" command
Expected Behavior
The "git pull" execution time should be around 3-4 seconds
Actual Behavior
The “git pull” execution time takes up to 20-22 seconds
Diagnostic Logs
Logs are required for review from WSL team
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs
Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1
The scipt will output the path of the log file once done.
Once completed please upload the output files to this Github issue.
Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.
View similar issues
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!
Open similar issues:
- WSL2 FS access to Windows on W11 is much slower than on Win10 (#9430), similarity score: 0.73
- WSL2 git is slow from gitlab (#6602), similarity score: 0.72
Closed similar issues:
- [WSL2] git is very slow even on the same filesystem (#8588), similarity score: 0.79
- Extremely Slow Performance (#10509), similarity score: 0.72
- WSL 2 read access significantly slower since update to WIndows 11 (#7650), similarity score: 0.72
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
WslNetworkingLogs-2024-05-07_10-23-15.zip
Here the WSL logs
Diagnostic information
Appx package is not installed
optional-components.txt not found
View similar issues
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!
Open similar issues:
- WSL2 FS access to Windows on W11 is much slower than on Win10 (#9430), similarity score: 0.73
Closed similar issues:
- [WSL2] git is very slow even on the same filesystem (#8588), similarity score: 0.79
- WSL 2 read access significantly slower since update to WIndows 11 (#7650), similarity score: 0.72
- [wsl2] unacceptable git performance after upgrade from wsl1 (#5496), similarity score: 0.72
- Extremely Slow Performance (#10509), similarity score: 0.72
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Diagnostic information
Issue was edited and new log file was found: https://github.com/microsoft/WSL/files/15232733/WslNetworkingLogs-2024-05-07_10-23-15.zip
Appx package is not installed
optional-components.txt not found
View similar issues
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!
Open similar issues:
- WSL2 FS access to Windows on W11 is much slower than on Win10 (#9430), similarity score: 0.73
- WSL2 git is slow from gitlab (#6602), similarity score: 0.72
Closed similar issues:
- [WSL2] git is very slow even on the same filesystem (#8588), similarity score: 0.80
- [wsl2] unacceptable git performance after upgrade from wsl1 (#5496), similarity score: 0.72
- WSL 2 read access significantly slower since update to WIndows 11 (#7650), similarity score: 0.72
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Diagnostic information
Issue was edited and new log file was found: https://github.com/microsoft/WSL/files/15232733/WslNetworkingLogs-2024-05-07_10-23-15.zip
Appx package is not installed
optional-components.txt not found
View similar issues
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!
Open similar issues:
- WSL2 git is slow from gitlab (#6602), similarity score: 0.73
- WSL2 FS access to Windows on W11 is much slower than on Win10 (#9430), similarity score: 0.71
Closed similar issues:
- [WSL2] git is very slow even on the same filesystem (#8588), similarity score: 0.79
- Docker login & pull extremely slow on WSL2 (#8733), similarity score: 0.73
- WSL 2 read access significantly slower since update to WIndows 11 (#7650), similarity score: 0.70
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Diagnostic information
Issue was edited and new log file was found: https://github.com/microsoft/WSL/files/15232733/WslNetworkingLogs-2024-05-07_10-23-15.zip
Appx package is not installed
optional-components.txt not found
Thank you @matpil. This delay could be caused by a variety of things, like a slow network connection, or a slow authentication go git.
Do you see the same behavior if let's say you clone / pull a public repo, like https://github.com/microsoft/WSL ?
Thank you for confirming @matpil.
The fact that cloning a public repository doesn't reproduce the issue shows the performance problem doesn't come from WSL, so I'll close this issue.
Here are a couple ideas to help you root cause the issue:
-
Look into whether you have configured git credential manager on WSL, and see if removing it solves the issue
-
Try to run
strace -f git pull
and see where the time is spent -
Check if your ~/.ssh/config has ForwardArgent or ForwardX11, and try to remove those options