simon-svn: putty: ben

tartarus-commits at lists.tartarus.org tartarus-commits at lists.tartarus.org
Mon Sep 24 16:18:12 BST 2007


SVN root:       svn://ixion.tartarus.org/main
Changes by:     ben
Revision:       7735
Date:           2007-09-24 16:18:11 +0100 (Mon, 24 Sep 2007)

Log message (15 lines):
Add support for automatically tuning the SSH-2 window size for decent
performance.  The theory behind this is fairly simple, though the
implementation turns out to be a little trickier than it looks.

The basic idea is that when the connection isn't being limited by our ability
to process data, we want to ensure that the window size _as seen by the server_
never drops to zero.  Measuring the server's view of the window size is done
by arranging for it to acknowledge every SSH_MSG_CHANNEL_WINDOW_ADJUST, or 
rather an SSH_MSG_CHANNEL_REQUEST sent just before it.  That way we can tell
when it its outgoing data stream it recieved the window adjustment, and
thus how small the server's view of the window got.

At present, we only ever increase the window size.  In theory, we could
arrange to reduce it again if the server's view of it seemed to be persistently
too large, but my experiments suggest that getting this right will be tricky.

Modified files:
U   putty/ssh.c

Links:
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi?rev=7735&view=rev
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/putty/ssh.c?rev=7735&r1=7734&r2=7735



More information about the tartarus-commits mailing list