Ticket #16 (closed defect)
Opened 6 years ago
Last modified 4 years ago
Slow Transfer Speeds
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Version: | ||
| Keywords: | Cc: | bagder | |
| Blocked By: | Blocks: |
Description
Hi.
Using ssh on high-speed internet links can see poor
performance with TCP Window size adjustments.
For openssh, there is a workaround for this slow speed,
which increases the window size inside of the channel:
If you are using openssh-3.5pl, the line to change is
119 of channels.h. Change value of
CHAN_SES_WINDOW_DEFAULT from 4*CHAN_SES_PACKET_DEFAULT to
100*CHAN_SES_PACKET_DEFAULT.
Below is an excerpt from an updated channels.h, with
the change indicated in red:
#define CHAN_EXTENDED_IGNORE 0
#define CHAN_EXTENDED_READ 1
#define CHAN_EXTENDED_WRITE 2
/* default window/packet sizes for tcp/x11-fwd-channel */
#define CHAN_SES_PACKET_DEFAULT (32*1024)
#define CHAN_SES_WINDOW_DEFAULT
(100*CHAN_SES_PACKET_DEFAULT) /*?
ORBITAL: changed from 4 to 100 */
#define CHAN_TCP_PACKET_DEFAULT (32*1024)
#define CHAN_TCP_WINDOW_DEFAULT (4*CHAN_TCP_PACKET_DEFAULT)
#define CHAN_X11_PACKET_DEFAULT (16*1024)
#define CHAN_X11_WINDOW_DEFAULT (4*CHAN_X11_PACKET_DEFAULT)
However, I cannot find a similar place inside of
libssh2's codebase to make a change that will work
along these lines. I have tried changing
LIBSSH2_CHANNEL_WINDOW_DEFAULT
LIBSSH2_CHANNEL_PACKET_DEFAULT
with no success.

Slow transfers aren't really a bug in libssh2 but unfortunately still mostly a design-issue.
I don't see how any references to openssh helps us, nor do I believe it has to do with the TCP window size. I would not be surprised however if the SSH window size is involved.