You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes, channel.go is unchanged since 2017.
What did you do?
Used tcpdump/Wireshark to observe packets on a long-lived SSH connection where the only application-level activity is sporadic small writes or a long stream of writes in the same direction, or other easy-to-understand patterns.
What did you expect to see?
TCP segments with data generally correspond to application-level writes, with only occasional window adjustments sent in the other direction (and rarely a rekeying, etc.).
What did you see instead?
A window adjustment is sent after every Channel.Read on the receiving end, which wastes bandwidth.
Solution
OpenSSH has logic for deferring window adjustments, which I think usually waits until about 5% of the window has been consumed. It seemingly hasn't changed since 2007, so I assume it works well enough for them.
I added similar logic to channel.adjustWindow and it seems to work as expected in local testing. If this sounds like a reasonable change, I'll see about signing the CLA and submitting a patch.
The text was updated successfully, but these errors were encountered:
dr2chase
added
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Dec 22, 2022
gopherbot
removed
the
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
label
Dec 22, 2022
What version of Go are you using (
go version
)?golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90
Does this issue reproduce with the latest release?
Yes, channel.go is unchanged since 2017.
What did you do?
Used tcpdump/Wireshark to observe packets on a long-lived SSH connection where the only application-level activity is sporadic small writes or a long stream of writes in the same direction, or other easy-to-understand patterns.
What did you expect to see?
TCP segments with data generally correspond to application-level writes, with only occasional window adjustments sent in the other direction (and rarely a rekeying, etc.).
What did you see instead?
A window adjustment is sent after every Channel.Read on the receiving end, which wastes bandwidth.
Solution
OpenSSH has logic for deferring window adjustments, which I think usually waits until about 5% of the window has been consumed. It seemingly hasn't changed since 2007, so I assume it works well enough for them.
I added similar logic to
channel.adjustWindow
and it seems to work as expected in local testing. If this sounds like a reasonable change, I'll see about signing the CLA and submitting a patch.The text was updated successfully, but these errors were encountered: