You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that sshfs is not currently actively developed, but writing this down here because so many people have had problems with this topic and it is not properly documented here in the upstream project.
Observation
cating a file over sshfs can be 100x slower over rclone mount with rclone's SFTP backend over high-latency connectinons (servers far away).
For example, on a 200 ms connection, pv < ssh-mount/myfile > /dev/null only prouces 1 MB/s when the connection shows 100 MB/s over TCP (measured with iperf3).
This is quite annoying because it effectively disables TCP Window Scaling, which was designed to provide high throughput over high-latency TCP links, by allowing more data to be in flight:
While the TCP would allow more data to be in flight, the OpenSSH implementation will just not send more data.
In general, this protocol follows a simple request-response model.
Each request and response contains a sequence number and multiple requests may be pending simultaneously. spec source
rclone implements pipelining with its SFTP concurrency setting, defaulting to 64.
Implemented by the Go library pkg/sftp in this code:
// Split the read into multiple maxPacket-sized concurrent reads bounded by maxConcurrentRequests.// This allows writes with a suitably large buffer to transfer data at a much faster rate// by overlapping round trip times.
sshfs does not seem to implement request pipelining, thus is is much slower.
The text was updated successfully, but these errors were encountered:
I know that sshfs is not currently actively developed, but writing this down here because so many people have had problems with this topic and it is not properly documented here in the upstream project.
Observation
cat
ing a file oversshfs
can be 100x slower overrclone mount
with rclone's SFTP backend over high-latency connectinons (servers far away).For example, on a 200 ms connection,
pv < ssh-mount/myfile > /dev/null
only prouces 1 MB/s when the connection shows 100 MB/s over TCP (measured withiperf3
).Reason
#define PACKET_MAX_SIZE (256 * 1024)
rclone
implements pipelining with its SFTPconcurrency
setting, defaulting to64
.pkg/sftp
in this code:sshfs
does not seem to implement request pipelining, thus is is much slower.The text was updated successfully, but these errors were encountered: