summaryrefslogtreecommitdiff
path: root/mount.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-06-01 18:43:23 +0200
committerJakob Unterwurzacher2017-06-01 18:52:02 +0200
commitf91ce0b00489696e5a6e3ec2f74070fc8f902c74 (patch)
tree055b6f20725b8fc3231eebadfc2fe13664850ea5 /mount.go
parentcf1ded5236157e2f9ec06eeea26023b67b40f16d (diff)
main: increase max write size to maximum
Previously, it was at the go-fuse default of 64KiB. Getting bigger writes should increase throughput somewhat. Testing on tmpfs shows an improvement from 112MiB/s to 120MiB/s.
Diffstat (limited to 'mount.go')
-rw-r--r--mount.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/mount.go b/mount.go
index c2d1f74..de87d53 100644
--- a/mount.go
+++ b/mount.go
@@ -282,8 +282,11 @@ func initFuseFrontend(key []byte, args *argContainer, confFile *configfile.ConfF
EntryTimeout: time.Second,
}
conn := nodefs.NewFileSystemConnector(pathFs.Root(), fuseOpts)
- var mOpts fuse.MountOptions
- mOpts.AllowOther = false
+ mOpts := fuse.MountOptions{
+ // Bigger writes mean fewer calls and better throughput.
+ // Capped to 128KiB on Linux.
+ MaxWrite: 1048576,
+ }
if args.allow_other {
tlog.Info.Printf(tlog.ColorYellow + "The option \"-allow_other\" is set. Make sure the file " +
"permissions protect your data from unwanted access." + tlog.ColorReset)