prefer fpool on linux as well

This commit is contained in:
ed 2021-11-12 22:57:36 +01:00
parent c26fb43ced
commit 9c09b4061a
2 changed files with 3 additions and 2 deletions

View file

@ -12,7 +12,6 @@
# change '/mnt::rw' to another location or permission-set # change '/mnt::rw' to another location or permission-set
# remove '-p 80,443,3923' to only listen on port 3923 # remove '-p 80,443,3923' to only listen on port 3923
# add '-i 127.0.0.1' to only allow local connections # add '-i 127.0.0.1' to only allow local connections
# add '--use-fpool' if uploading into nfs locations
# #
# with `Type=notify`, copyparty will signal systemd when it is ready to # with `Type=notify`, copyparty will signal systemd when it is ready to
# accept connections; correctly delaying units depending on copyparty. # accept connections; correctly delaying units depending on copyparty.

View file

@ -57,8 +57,10 @@ class SvcHub(object):
if args.log_thrs: if args.log_thrs:
start_log_thrs(self.log, args.log_thrs, 0) start_log_thrs(self.log, args.log_thrs, 0)
if not ANYWIN and not args.use_fpool: if not args.use_fpool and args.j != 1:
args.no_fpool = True args.no_fpool = True
m = "multithreading enabled with -j {}, so disabling fpool -- this can reduce upload performance on some filesystems"
self.log("root", m.format(args.j))
if not args.no_fpool and args.j != 1: if not args.no_fpool and args.j != 1:
m = "WARNING: --use-fpool combined with multithreading is untested and can probably cause undefined behavior" m = "WARNING: --use-fpool combined with multithreading is untested and can probably cause undefined behavior"