Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow transferspeed with sshfs + osxfuse version > 2.8.3 #389

Closed
ibaun opened this issue Jul 7, 2017 · 1 comment
Closed

Slow transferspeed with sshfs + osxfuse version > 2.8.3 #389

ibaun opened this issue Jul 7, 2017 · 1 comment

Comments

@ibaun
Copy link

ibaun commented Jul 7, 2017

Mounting a network disk with sshfs on macosx seems to give me very slow transfer speeds.

Test setup:

  • Ubuntu server 16.04 on remote end
  • mac osx 10.11.6 on local end
  • sshfs remote@ip:. ~/dir
  • rsync --progress ~/dir/somefile ~/

With a direct scp remote@ip:dir/somefile ~/ I get about 110 MB/s transfer speed.
Using sshfs over osxfuse, the results are:
rsync from sshfs 2.9.0 + osxfuse 2.8.1: ± 55 MB/s
rsync from sshfs 2.9.0 + osxfuse 2.8.2 & 2.8.3: ± 50 MB/s
rsync from sshfs 2.9.0 + osxfuse >= 3.0.4: ± 10 MB/s

This has been discussed also at libfuse/sshfs#11, with the latest results pointing more towards a problem with osxfuse than sshfs.

@bfleischer
Copy link
Member

The slow transfer speeds are a result of an incompatibility between sshfs and FUSE for macOS 3.x. sshfs returns "wrong" values in sshfs_getattr() and sshfs_fgetattr().

The st_blksize value of struct stat represents the optimal block size for file I/O operations. FUSE for macOS will use this value when performing read or write operations on the file. The smaller st_blksize is the more context switches are required to complete the operation.

Setting st_blksize to 0 results in FUSE for macOS falling back to the global I/O size, that can be specified through the -o iosize=... mount-time option.

Nikratio pushed a commit to libfuse/sshfs that referenced this issue Jul 13, 2017
The st_blksize value of struct stat represents the optimal block size
for file I/O operations. FUSE for macOS will use this value when
preforming read or write operations on the file. The smaller st_blksize
is the more context switches are required to complete the operation.

Setting st_blksize to 0 results in FUSE for macOS falling back to the
global I/O size, that can be specified through the "-o iosize=..."
mount-time option.

Fixes osxfuse/osxfuse#389 and osxfuse/sshfs#33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants