Should I be filing a Change Request or a bug report for this issue? It =
appears to me that there are ways to enhance the performance of SSH v2 =
from these emails and it may be useful for everyone to get the correct =
changes for this into the next release.

Amba

>>> Michael A Stevens 02/28/05 11:09AM >>>

Its somewhat more complicated than this. The correct solution is to =
scale=20
the SSH window to a value that matches the window of the protocol=20
encapsulating the SSH data. Hard-coding window values into the binary=20
isn't a great idea. For any given protocol stack, the windows=20
should all match. Smaller ones will be bottlenecks, and larger ones=20
wasting space.

There also is a complication with just scaling the SSH window to a =
larger=20
size because of a small bug in the channel code that grows a buffer to=20
something larger than the buffer check allows. This really shouldn't=20
happen though, as SSH should be able to depend on the underlying TCP=20
buffer to hold data that it has not fetched yet.


Mike

On Mon, 28 Feb 2005, Markus Friedl wrote:

> On Mon, Feb 28, 2005 at 11:09:26AM -0500, Christopher Rapier wrote:
>> bandwidth =3D (MIN(tcp rwin, SSH2 FC buf))
>> ----------------------------
>> RTT
>>
>> Since the effective SSH2 flow control buffer is 64K (its actually
>> defined as 128K but only 1/2 of it is actually used) and most TCP

>
> well this can be changed.
>
> Index: channels.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D
> RCS file: /cvs/src/usr.bin/ssh/channels.c,v
> retrieving revision 1.211
> diff -u -r1.211 channels.c
> --- channels.c 29 Oct 2004 21:47:15 -0000 1.211
> +++ channels.c 27 Nov 2004 14:56:18 -0000
> @@ -1518,10 +1518,13 @@
> static int
> channel_check_window(Channel *c)
> {
> - if (c->type =3D=3D SSH_CHANNEL_OPEN &&
> - !(c->flags & (CHAN_CLOSE_SENT|CHAN_CLOSE_RCVD)) &&
> - c->local_window < c->local_window_max/2 &&
> - c->local_consumed > 0) {
> + if (c->type !=3D SSH_CHANNEL_OPEN ||
> + c->flags & (CHAN_CLOSE_SENT|CHAN_CLOSE_RCVD) ||
> + c->local_consumed <=3D 0)
> + return 1;
> + if ((c->local_window_max - c->local_window <
> + 3 * CHAN_SES_PACKET_DEFAULT) ||
> + c->local_window < c->local_window_max/2) {
> packet_start(SSH2_MSG_CHANNEL_WINDOW_ADJUST);
> packet_put_int(c->remote_id);
> packet_put_int(c->local_consumed);
> Index: channels.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D
> RCS file: /cvs/src/usr.bin/ssh/channels.h,v
> retrieving revision 1.75
> diff -u -r1.75 channels.h
> --- channels.h 29 Oct 2004 21:47:15 -0000 1.75
> +++ channels.h 27 Nov 2004 14:55:27 -0000
> @@ -118,7 +118,7 @@
>
> /* default window/packet sizes for tcp/x11-fwd-channel */
> #define CHAN_SES_PACKET_DEFAULT (32*1024)
> -#define CHAN_SES_WINDOW_DEFAULT (4*CHAN_SES_PACKET_DEFAULT)
> +#define CHAN_SES_WINDOW_DEFAULT (40*CHAN_SES_PACKET_DEFAULT)
> #define CHAN_TCP_PACKET_DEFAULT (32*1024)
> #define CHAN_TCP_WINDOW_DEFAULT (4*CHAN_TCP_PACKET_DEFAULT)
> #define CHAN_X11_PACKET_DEFAULT (16*1024)
>
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev@mindrot.org=20
> http://www.mindrot.org/mailman/listi...sh-unix-dev=20
>
>


__________________________________________________ ______________________
This email has been scanned for computer viruses.

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://www.mindrot.org/mailman/listi...enssh-unix-dev