Date: Tue, 25 Apr 2023 13:31:32 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271065] Kernel FUSE limits read() size by 64k/128k Message-ID: <bug-271065-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271065 Bug ID: 271065 Summary: Kernel FUSE limits read() size by 64k/128k Product: Base System Version: 13.2-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: rozhuk.im@gmail.com I am trying to increase sshfs file read speed from remote mount with RTT ~7= 0+ms and I need some help with kernel FUSE. Read speed is limited by RTT and read chunk size, RTT can not be fixed by c= ode but we can increase read chunk size. sshfs -o remember=3D30 -o auto_cache -o cache=3Dyes -o kernel_cache -o compression=3Dyes -o max_write=3D67108864 -o max_read=3D67108864 -o dir_cac= he=3Dyes -o noatime root@somehost:/ /mnt/tmp -d -v -o debug --debug + dd if=3D'/mnt/tmp/some_big.file' of=3D/dev/null bs=3D4m status=3Dprogress produces: unique: 14130, opcode: READ (15), nodeid: 850, insize: 80, pid: 4468 [01249] READ [01250] READ [01247] DATA 131076bytes (95ms) [01248] DATA 22bytes (95ms) unique: 14130, success, outsize: 131088 If "sysctl vfs.maxbcachebuf=3D128k" then "unique: 14130, success, outsize: 131088" -> "unique: 14130, success, outsize: 262144". (sshfs hacked for read ahead) This increase read speed ~twice, but not enough to utilize 100m link. vfs.maxbcachebuf=3D512k or 1024k is ok for remote mount @ 100m link but if = may be too big for other FS mounted locally. I found 64k limit in fuse_vfsop_mount(): "mp->mnt_stat.f_iosize =3D maxbcachebuf;". Then I try to change it to "maxphys" - system panics or hang on read() from sshfs mount. Looks like more changes required due to "fuse_iosize() { return mp->mnt_stat.f_iosize; }" used in many places, probably some of them expect only "maxbcachebuf". IMHO mp->mnt_stat.f_iosize =3D maxphys or maxphys/2 will be better default. Also if "max_read" is set and "maxbcachebuf < max_read < maxphys" then it c= an be used. Can some one help with this? --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271065-227>