1

I have an application using apache SSHD to send files via sftp (with the SftpClient class). I have noticed that the performance was very poor and I made a simple test comparing apache SSHD with Jsch, which gives much better results (seven times faster!) comparable with the openssh implementation.

Even though the performance can be partly improved (~30%) by changing the buffer size, for example, I haven't been able to match Jsch's performance by a long shot.

Has anybody noticed similar performance issues using apache SSHD as a client?

Do you have any suggestions to tune the performance, besides the buffer size?

Nicola Ambrosetti
  • 2,567
  • 3
  • 22
  • 38

1 Answers1

0

The SFTP poor performances have been fixed as part of https://issues.apache.org/jira/browse/SSHD-979.

As Eugene hinted, packet pipelining was not implemented. This is the fact that when downloading, the client will ask for as much data as possible by issuing several read requests and keep a number of them running, so that it does not have to wait for a request to be received and written to disk before requesting more data. The same also affects upload as the client will send send several write requests instead of waiting for the server to acknowledge the request prior to sending a new one.

This is now fixed and SSHD performances are now at the same level as other implementations.

Guillaume Nodet
  • 311
  • 1
  • 5