"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
config: add "multi-thread-chunk-size" flag #7056
Vitor Gomes7701d1d33d40
diff --git a/fs/config.go b/fs/config.goindex 060567447..c0bd306f8 100644--- a/fs/config.go+++ b/fs/config.go@@ -145,8 +145,9 @@ type ConfigInfo struct {Metadata boolServerSideAcrossConfigs boolTerminalColorMode TerminalColorMode- DefaultTime Time // time that directories with no time should display- Inplace bool // Download directly to destination file instead of atomic download to temp/rename+ DefaultTime Time // time that directories with no time should display+ Inplace bool // Download directly to destination file instead of atomic download to temp/rename+ MultiThreadChunkSize SizeSuffix // Chunk size for multi-thread downloads / uploads, if not set by filesystem}// NewConfig creates a new config with everything set to the default@@ -184,6 +185,7 @@ func NewConfig() *ConfigInfo {// c.StatsOneLineDateFormat = "2006/01/02 15:04:05 - "c.MultiThreadCutoff = SizeSuffix(250 * 1024 * 1024)c.MultiThreadStreams = 4+ c.MultiThreadChunkSize = SizeSuffix(50 * 1024 * 1024)c.TrackRenamesStrategy = "hash"c.FsCacheExpireDuration = 300 * time.Seconddiff --git a/fs/config/configflags/configflags.go b/fs/config/configflags/configflags.goindex 3839691d0..36ff2cb6f 100644--- a/fs/config/configflags/configflags.go+++ b/fs/config/configflags/configflags.go@@ -127,6 +127,7 @@ func AddFlags(ci *fs.ConfigInfo, flagSet *pflag.FlagSet) {flags.FVarP(flagSet, &ci.MultiThreadCutoff, "multi-thread-cutoff", "", "Use multi-thread downloads for files above this size", "Copy")flags.IntVarP(flagSet, &ci.MultiThreadStreams, "multi-thread-streams", "", ci.MultiThreadStreams, "Max number of streams to use for multi-thread downloads", "Copy")flags.FVarP(flagSet, &ci.MultiThreadWriteBufferSize, "multi-thread-write-buffer-size", "", "In memory buffer size for writing when in multi-thread mode", "Copy")+ flags.FVarP(flagSet, &ci.MultiThreadChunkSize, "multi-thread-chunk-size", "", "Chunk size for multi-thread downloads / uploads, if not set by filesystem", "Copy")flags.BoolVarP(flagSet, &ci.UseJSONLog, "use-json-log", "", ci.UseJSONLog, "Use json log format", "Logging")flags.StringVarP(flagSet, &ci.OrderBy, "order-by", "", ci.OrderBy, "Instructions on how to order the transfers, e.g. 'size,descending'", "Copy")flags.StringArrayVarP(flagSet, &uploadHeaders, "header-upload", "", nil, "Set HTTP header for upload transactions", "Networking")