cygwin - 为什么msys2或cygwin中scp的传输速度限制为4MB

标签 cygwin git-bash scp openssh msys2

我在 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/

相关文章:

bash - Git 钩子(Hook)。如何从用户输入中读取变量?

git: 'credential-cache' 不是 git 命令

linux - 使用 Find 和 SCP 维护目录结构

linux - 使用 cygwin 添加 FILE_SHARE_READ 模式

git bash 如何启用快速编辑模式?

c# - 在 C# 中使用 pscp 通过 post 请求在 Windows 和 Linux 之间传输文件

linux - SCP 命令有效,但我找不到下载的文件

mysql - 无法从 Cygwin 连接到 MySQL

sed搜索并替换创建新文件

python - meson 找到 python3 二进制文件,但找不到 python3 依赖项