TCP window size with SSH

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm investigating whether SSH allows you you change the TCP window
If you want to send data over a LFN (Long Fat Pipe), latency (Round
Trip Time) will reduce the size of the packet window.  You eventually
get a very low throughput if the latency is large (e.g.
trans-atlantic), even if the pipe is big.

On Solaris, you can set the window size quite high using these
ndd -set /dev/tcp tcp_xmit_hiwat 100000
ndd -set /dev/tcp tcp_recv_hiwat 100000
ndd -set /dev/tcp tcp_wscale_always 1
...which switches on window scaling.

However, when doing a snoop it shows a Window scale = 0 after the
first 2 packets.

Does this mean that SSH _WILL NOT_ use TCP Window scaling, or have I
just overlooked something?

Any suggestions on how to use TCP window scaling & how to prove it's
working would be much appreciated. Thanks.

Re: TCP window size with SSH

You're asking about an implementation feature, and haven't said what SSH
software you're using.

  Richard Silverman

Re: TCP window size with SSH

Sorry for the lack of info, I was just trying a general email to see
if anyone was interested - I haven't seen this discussed anywhere.

Anyway, I'm running OpenSSH 3.6.1p1 on 2 boxes (Solaris 8), each on
either side of a 2MB long-distance link. There's plently of discussion
on the net about TCP latency, and the use of TCP window scaling to
overcome it.

However, I've tried the network settings to allow this, as discussed
above, but the SSH connection seems to be as slow as ever.  Also,
running snoop on the traffic shows that window scaling isn't being
used after the first 2/3 packets.

I'm wondering if, like standard Solaris FTP, SSH is throttling back to
standard window sizes and refusing to use scaling.  If wu-FTP is used,
you can ask it to use TCP window scaling i.e. at the application

Does anyone know if SSH can be asked to use TCP window scaling, either
at application (SSH) level, or TCP level if configured?


Re: TCP window size with SSH

Mike, Thanks for the top tip. I didn't think to look at the sftp
switches - not something I use directly very often!

I did a few preliminary tests & these certainly make a difference.
I'll try & do some tests with these switches AND the network card
settings to see what happens.

Site Timeline