From 8822b60d9dbd9907065e7999f616b11ddce6d584 Mon Sep 17 00:00:00 2001 From: Timo Savola Date: Sat, 14 Oct 2017 17:36:36 +0300 Subject: Add support for using multiple connections The -o max_conns=N option causes multiple SSH processes and response processing threads to be created. This means that e.g. reading a large file no longer blocks all access to the filesystem. The connection is chosen by checking the per-connection statistics: 1. Choose connection with least outstanding requests; if it's a tie, 2. choose connection with least directory handles; if it's a tie, 3. choose connection with least file handles; if it's a tie, 4. choose connection which has already been established. The implementation assumes that the max_conns values will be small; it uses linear search. Example benchmark: With single connection: $ sshfs -o max_conns=1,workaround=nobuflimit ebox: mnt $ cat mnt/tmp/bigfile > /dev/null & $ time find mnt > /dev/null real 1m50.432s user 0m0.133s sys 0m0.467s With multiple connections: $ ~/in-progress/sshfs/build/sshfs -o max_conns=5,workaround=nobuflimit ebox: mnt $ cat mnt/tmp/bigfile > /dev/null & $ time find mnt > /dev/null real 1m15.338s user 0m0.142s sys 0m0.491s This feature was implemented to large extend by Timo Savola . Thanks to CEA.fr for sponsoring the remaining work to complete this feature and integrate it into SSHFS! --- sshfs.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sshfs.rst') diff --git a/sshfs.rst b/sshfs.rst index e3222f1..0fe84f2 100644 --- a/sshfs.rst +++ b/sshfs.rst @@ -218,6 +218,14 @@ Options for example if the file size is not known in advance (before reading it). e.g. /proc filesystem +-o max_conns=N + sets the maximum number of simultaneous SSH connections + to use. Each connection is established with a separate SSH process. + The primary purpose of this feature is to improve the responsiveness of the + file system during large file transfers. When using more than once + connection, the *password_stdin* and *slave* options can not be + used, and the *buflimit* workaround is not supported/ + In addition, SSHFS accepts several options common to all FUSE file systems. These are described in the `mount.fuse` manpage (look for "general", "libfuse specific", and "high-level API" options). -- cgit v1.2.3