Much slower SFTP transfer speed
I have switched from ES file explorer to Material files for a few months, And I realize theres a significant difference in file transfer speed.
Test environment: SSH server
- Raspberry Pi 4B 2GB ram
- Ethernet connection
- 240GB SSD less than half filled
OpenSSH_8.4p1 Debian-5+deb11u1, OpenSSL 1.1.1n 15 Mar 2022
Test file: a 448MB .ts video file
Material files starts slow at about 500KB/s, as indicated by the system network activity (theres no transfer speed in the notification, just transfered/total infomation). Then raised the speed to about 2 MB/s. I have waited until the number settles. The system network activity meter has a refresh interval of about 5 seconds

On the other hand, ES file explorer has a transfer window stating the file transfer was done at 52MB/s. The system network activity meter agreed with it, saying that it was transfering at about 54MB/s.

And I have confirmed the speed by using termux and sftp. Also >45 MB/s

For download speeds, theres also quite a difference.

- Material files: N/A, system: 4.6MB/s
- ES file explorer: 55MB/s, system: 59.8MB/s
- Termux sftp: 47MB/s, system: 57MB/s
Material files transfer at 2-5MB/s fluctuating, but never reaches above 10MB/s
Why is there such a difference?
The slow transfer speed also makes the thumbnail loading speed VERY slow, especially if the directory contains a lot of images.
I don't know either, and I actually don't use the SFTP functionality myself - it was added on user request. The functionality is implemented with sshj and its default configuration, so one is welcomed to figure out what needs to be improved.
- Is the file transfer in Material Files to SFTP server multi-threaded?
- And is the request done using
scporsftp? - Is there any way for users to disable compression?
- Any plans on having an "advanced mode" where every settings (of SSHJ) can be tweaked?
中文我也看得懂,你希望的話我可以用中文
UPDATE: after reading https://github.com/hierynomus/sshj/issues/688, I think the issue may lie in the compression stage. I will further test the speed with termux and compression ON.
Edit: Termux sftp with compression ON and sftp speed meter:
- upload: 24.1MB/s
- download: 9.2MB/s
Both case MUCH slower than without compression.
Is there any update on this?
If I use TotalCommander on Android to compare the speed, I can switch between scp and sftp protocol. If I transfer via SCP I get usually 12MB/s, when I switch the same connection in TotalCommander to sftp, i have 4MB/s. Server in my case is a Raspberry pi 3b with internal-sftp from openssh. I don't know if a SFTP connection in Material Files can be primary a SCP connection with auto fallback to SFTP, if SCP is not available. As an alternative, there could be a checkbox to enable/disable SCP for a given connection.
On the other hand, I have tried Solid Explorer with a pure SFTP connection at 8MB/s for the same server/file combination.
There is a lot room for optimization in Material Files for a SFTP connection. Hopefully we get some update in the future.
If you need some tests, feel free to ask. I have no Android/Java coding skills, but I can test it with different server conditions if needed.
Transfer speeds are very slow compared to termux sftp.
If not ssh, what other encrypted protocol is supported by Material Files that can offer higher file transfer throughput over network?