Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of the SSH protocol channel data window size?

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?

like image 608
hopia Avatar asked Apr 01 '11 01:04

hopia


1 Answers

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).

like image 195
geekosaur Avatar answered Oct 03 '22 21:10

geekosaur