microsoft/WSL

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

image

Diagnostic Logs

WslNetworkingLogs-2024-05-07_10-23-15.zip

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:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

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:

Closed similar issues:

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:

Closed similar issues:

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:

Closed similar issues:

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 ?

Hi,
If I clone a public repo (the same you suggest) the response time is ok
image

To connect to our git server I use a ssh connection (by sshkey)
image

btw, I feel to exclude a slow network connection; I don't know how to test a slow auth (as I said, it's by sshkey)

have you any suggest?

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