Shawn Pearce <[email protected]> wrote: > We're seeing a performance regression in SSHD 0.3.0, the throughput > is about 1/2 of what it was in SSHD 0.2.0. > > Bisecting the problem in git led me to revision 882491, which was > the bug fix for https://issues.apache.org/jira/browse/SSHD-49.
I committed a few changes that actually improve this situation considerably, we're now back to where we were with 0.2.0, and even slightly faster as our write buffer allocation is now better sized to meet packet writes. Guillaume, I really didn't follow how the delta in 882491 fixed SSHD-49's problem. You changed a bunch of stuff there all at once. But it seems to me the root cause was using putBytes() and not putRawBytes(), so the split packets were corrupted with an extra 4 bytes of data due to the unnecessary length being inserted. The other changes related to buffering everything on the stream until the application calls flush() seem to me to be completely unrelated to solving SSHD-49, and actually caused problems for Commands that write a lot of data and don't ever call flush(). I'm still a bit unhappy with throughput. I guess I need to dig into SSHD-54 here. The throughput still isn't as fast as we'd like it to be, especially over LAN connections.
