SSH.NET icon indicating copy to clipboard operation
SSH.NET copied to clipboard

Android download performance

Open astaikos-hp opened this issue 6 months ago • 3 comments

Hello. Using SFTP to download files from our SFTP server and are experiencing slow downloads on Android as if it is only downloading one chunk at a time. Our application is operating as expected in Windows and iOS. Are there any settings that we can tweak to help the download speed on Android?

astaikos-hp avatar Jul 24 '25 21:07 astaikos-hp

Are you using SftpClient.DownloadFile? Any other method does download one chunk at a time (at the time of writing).

Aside from that, SftpClient does have a BufferSize property (and there are other internal properties) but I would not know whether the existing values are somehow sub-optimal on Android

This is assuming that the device has bandwidth to spare

Rob-Hague avatar Aug 03 '25 15:08 Rob-Hague

I am using SftpClient.DownloadFile.

I have tried setting the BufferSize to 1MB and 4MB, but still not getting equal performance on Android device as opposed to other devices. What other properties can I look at?

astaikos-hp avatar Aug 04 '25 21:08 astaikos-hp

Ok, you are using the best method, and actually the BufferSize does not make any difference above 64KB. I think your best bet is to measure bandwidth / latency / TCP window size. These will help inform you whether the network is the bottleneck or something else.

Rob-Hague avatar Aug 05 '25 06:08 Rob-Hague