SSH协议通道数据窗口大小的目的是什么?
我所说的是安全外壳 (SSH) 连接协议 RFC (RFC 4254) 中定义的数据传输“窗口大小”。
我见过一些建议,使 SSH 窗口大小与 TCP 窗口大小相同,以获得最佳数据传输速率。
如果是为了缓冲,套接字层已经在处理 SSH 的缓冲了。
那么它有什么好处呢?
I'm talking about the data transfer "window size" as defined in the The Secure Shell (SSH) Connection Protocol RFC (RFC 4254).
I've seen some recommendations to make the SSH Window Size the same as the TCP Window Size for optimal data transfer rates.
And if it's for buffering, the sockets layer is already handling the buffering for SSH.
So what is it good for?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,
ssh
实际上对缓冲区和窗口做了很多愚蠢的事情。匹兹堡超级计算中心的 HPN-SSH 网站有一个很好地概述了需要调整的内容,以及为您针对各种 OpenSSH 版本进行调整的补丁。但至于软件中的缓冲和窗口:是的,内核套接字层进行缓冲。它具有有限的缓冲区空间,必须在所有网络活动之间共享;用户空间程序可以存储更多数据,而且它们可以在不进行上下文切换的情况下向缓冲区添加更多数据(这会很昂贵,尤其是一次处理一个字符时)。
ssh
actually does a lot of stupid things with respect to buffers and windows by default. The Pittsburgh Supercomputing Center's HPN-SSH website has a good overview of what needs to be adjusted, along with patches that do the adjusting for you for various OpenSSH versions.But as to buffering and windows in software: yes, the kernel sockets layer does buffering. It has finite buffer space that must be shared across all networking activity; userspace programs can store more, plus they can do so without incurring context switches to add more data to their buffers (which gets expensive, especially when it's done a character at a time).