我在 git bash 中使用 scp 将文件传输到远程服务器。我发现传输速度限制为4MB。当我在win32_openssh中使用scp时,速度达到10MB。 然后我安装了cygwin openssh进行对比测试,scp速度也是4MB。
那么为什么会受到限制呢?怎么破解呢?
最佳答案
这似乎是 Cygwin 本身的限制,如本文 2006 thread 中所述。
Unfortunately, the performance of the cygwin sshd server is very poor when it comes to copying large files.
I have made this observation on several new and fast machines (3 GHz, 512 MB RAM, 100 MB/s Intel Pro network card) running with Windows XP or Windows 2003 Server.
The best speed achievable was about 4 MB/s when copying a file from the SSH client to the SSH server;
when doing it the other way round, the throughput was even worse, about 2.3 MB/s.
I tried it on three different machines running the newest version of cygwin's sshd und scp/sftp. The results were approximately the same. Neither the client's nor the server's processor was really busy. The CPU usage oscillated around 30-40%.
Setting up the same scenario on linux yielded a completely different picture.
Using the Knoppix disc 4.0.2 on the client and the server machine I easily achieved a throughput of 10.8 MB/ in both directions (pushing a file to the server or downloading a file from it).
该线程 points out to :
The low speed of ssh and scp is not because of the encyption. The problem is the 64K limit for the window size in the protocoll.
关于cygwin - 为什么msys2或cygwin中scp的传输速度限制为4MB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63608359/