-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git Bash SCP command is slow #2943
Comments
We just deployed Git for Windows 2.30 on these machines: Download and upload of files now take at least twice the time v2.17 used |
We're not patching OpenSSH beyond what you see in https://github.com/git-for-windows/MSYS2-packages/tree/HEAD/openssh. |
Same problem. It seems to max out at just over 4MB/s. It seems to definitely be related to MSYS2. |
The puzzle might be solved by the difference between the OpenSSH that is in The source code for the former is hosted here (build instructions here: https://github.com/PowerShell/Win32-OpenSSH/wiki/Building-OpenSSH-for-Windows-(using-LibreSSL-crypto)), the latter's source code is constructed from the official openssh-portable source archives, plus a couple custom patches: https://github.com/git-for-windows/MSYS2-packages/tree/main/openssh |
Once a Git build was released that contains git-for-windows/build-extra/pull/367 you can make Git used Window OpenSSH and related binaries including Windows scp. Has implications on existing setups, though, because SSH setups that rely on the Git unix-like sockets won't work anymore. |
Since Git for Windows v2.33.0 was released with the option to prefer the system OpenSSH, I'll close this ticket. |
Setup
Note: I am still using 2.17 due to #2218 , which is still not fixed, either by Git for Windows, or the core Git team.
defaults?
NOTE: Originally Putty was used, but due to even worse performance than Git Bash SCP, it was changed to use OpenSSH instead; some of the machines used no longer have Putty installed.
to the issue you're seeing?
Much of recent testing was done on clean Win10 installs
Details
Git Bash
Minimal, Complete, and Verifiable example
this will help us understand the issue.
When downloading from a Linux host on the same local network, often same switch, and definitely in the same room, download speed should be at least 1 Gigabit per second (100 MB/s), and only limited by network speed and/or distance
For same-network downloads max download speed was at most 7-8 MB/s (>65 Mbit/s), some tests might reach 9 MB/s. Some of the machines have 10 Gbps network connections.
Upload speeds were even slower (5-6 MB/s (~50 Mbit/s).
Using Windows 10 OpenSSH SCP achieved 100 MB/s (>800 Mbit/s) download speed on the same machine, same remote host, same file.
URL to that repository to help us with testing?
N/A
NOTE: I suspect this also affects Git cloning speeds with OpenSSH.
It is possible that this is an upstream issue in OpenSSH, and that Microsoft patched the Win10 version themselves.
I have previously worked on Windows network code (in the Opera (Presto) browser, v12 and earlier), and as I recall, to get max network performance on Windows the code need to do the following (assumes async sockets):
The reason for this, as I recall, is that Windows sockets does not send an ACK before the data have been read by the application (this may be the case on Linux as well, but it seems apps there are behaving differently wrt reading data). As data continues to be read quickly, the sender will push more and more data into the connection pipeline, increasing the transfer speed up to the limit of the connection. The same applies for sending data.
For reference, we are planning to start using the Windows 10 SCP application to work around this issue.
The text was updated successfully, but these errors were encountered: