-
Notifications
You must be signed in to change notification settings - Fork 7
merging: Support request size negotiation and increased throughput on high-latency connections #1
Conversation
@ccope all the tests pass, it works well, it's going ahead. Thanks for the code! |
I have mounts with ~70ms RTT, see no performance increase. Original sshfs/latest commit from this repo gives to me up to 1,5mb/sec.
Also looks like: #8 is regress after this PR. PS: test done on FreeBSD<->FreeBSD, may be kernel does not handle read_ahead. |
I also play with max read/write size and got: libfuse@de03645 It depend on
Idea with limits is good but some questions to implementation ) PS: there is 3 separate changes:
|
Before the request size negotiation feature was implemented, the protocol limited requests to 64kb, so the client just hardcoded the limit. When OpenSSH merged size negotiation, they bumped up the default limit to 256kb. It's been a while since I've experimented with this, but (if I remember correctly) I either recompiled the server binary myself with a custom limit, or determined that there was a way to run the server without any limits of its own, in which case the client limit is used. |
Also, for reference, I am dealing with ~200ms latency connections. |
The trickiest part of this PR was that there was a bunch of hand-rolled synchronous requests being made during the creation of the SFTP session. As I needed to add yet another synchronous call for limit negotiation, I converted the asynchronous request flow to a stripped down synchronous version and ported all of the other synchronous calls to use it as well. That's why you see changes related to UID and check root. |
Ok, I did some checking. The openssh sftp server changed SFTP_MAX_MSG_LENGTH in sftp-common.h from 64kb to 256kb when they added request size negotiation. For my tests I patched the limit to 4MB. I haven't gotten around to making a PR to the openssh project to make that argument a command line flag/config file setting. |
Most common issue with low speed on big RTT is not segment size, but algo how it work. IMHO it is possible to implement read_ahead feature inside sshfs and not depend on kernel. In my case some how FreeBSD send to fuse or fuse to sshfs small read blocks, even if I play with Also TCP CC = hybla (may be bbr) for linux and rack+htcp for FreeBSD allow speed up segment transmit speed. |
There is readahead logic in libfuse, but it's disabled if it detects the kernel will do readahead. When I first looked into this Linux kernel readahead had a hard coded cap of, iirc, 128kb. This might have changed in the last few years, I'll have more time to investigate later this week. |
attempting to merge PR libfuse#267