Discuss this help topic in SecureBlackbox Forum

Introduction

SFTP transfer speed is influenced by the size of certain buffers, used during the transfer, and by use of so-called pipelining, i.e. asynchornous sending and receiving of multiple requests.

SecureBlackbox SFTP client is set in the way to work with most SFTP servers as-is. Default settings provide maximum compatibility, however the speed is lower than it could be achieved when the settings are optimized for some particular SFTP server. If you know the operations, which will be performed (upload or download or both) and the name and version of the target SFTP server, you can adjust the buffer sizes in order to achieve maximum transfer speed.

Buffers

TElSftpClient component introduces several buffer-related properties. The properties to adjust are

  • DownloadBlockSize. Controls the size of the single request for data reading from the remote server. The default value is 0, which means "use optimal value". Optimal value is set to 2Mb - 256b.
  • UploadBlockSize. Controls the size of the single request for data writing to the remote server. The default value is 0, which means "use optimal value". Optimal value is set to 32Kb - 256b since not all servers support larger values. For example, F-Secure and Tectia SSH servers fail to handle larger blocks.
  • SftpBufferSize. Controls the size of the buffers, used for Sftp communications. The default value is 128Kb. Changing this value is not recommended, however you can try, if you definitely know the name and version of the server software AND after you test the chosen value in production conditions.
TElSimpleSFTPClient contains corresponding properties.

Pipelining

In TElSftpClient pipelining is implemented by passing requests to TElSftpClient.Read() and TElSftpClient.Write() methods with size, larger than the value of DownloadBlockSize and UploadBlockSize properties. For example, if DownloadBlockSize is 64K and you request 128K-large block, there will be 2 asynchonous requests sent.
TElSimpleSFTPClient offers PipelineLength property to control the number of requests, sent asynchronously. The value of 1 means "no pipelining". Eg. when you call TElSimpleSFTPClient.Read() and request 128K of data, the component will use PipelineLength property to determine the maximum size of the chunks, requested from underlying TElSftpClient.Read() method.

Discuss this help topic in SecureBlackbox Forum