From ddb47758f33519cb13c1978d929d387281c6abaf Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 12 Apr 2016 21:33:55 +0100 Subject: [PATCH] drive: increase default chunk size to 8 MB and document - fixes #397 --- docs/content/drive.md | 14 +++++++++----- drive/drive.go | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/content/drive.md b/docs/content/drive.md index 5819c3465..148127be1 100644 --- a/docs/content/drive.md +++ b/docs/content/drive.md @@ -1,7 +1,7 @@ --- title: "Google drive" description: "Rclone docs for Google drive" -date: "2015-09-12" +date: "2016-04-12" --- Google Drive @@ -129,16 +129,20 @@ system. #### --drive-chunk-size=SIZE #### -Upload chunk size. Must a power of 2 >= 256k. Default value is 256kB. +Upload chunk size. Must a power of 2 >= 256k. Default value is 8 MB. + +Making this larger will improve performance, but note that each chunk +is buffered in memory one per transfer. + +Reducing this will reduce memory usage but decrease performance. #### --drive-full-list #### -Use a full listing for directory list. More data but usually -quicker. On by default, disable with `--full-drive-list=false`. +No longer does anything - kept for backwards compatibility. #### --drive-upload-cutoff=SIZE #### -File size cutoff for switching to chunked upload. Default is 256kB. +File size cutoff for switching to chunked upload. Default is 8 MB. #### --drive-use-trash #### diff --git a/drive/drive.go b/drive/drive.go index f1bca4059..b318442e3 100644 --- a/drive/drive.go +++ b/drive/drive.go @@ -51,7 +51,7 @@ var ( driveExtensions = pflag.StringP("drive-formats", "", defaultExtensions, "Comma separated list of preferred formats for downloading Google docs.") // chunkSize is the size of the chunks created during a resumable upload and should be a power of two. // 1<<18 is the minimum size supported by the Google uploader, and there is no maximum. - chunkSize = fs.SizeSuffix(256 * 1024) + chunkSize = fs.SizeSuffix(8 * 1024 * 1024) driveUploadCutoff = chunkSize // Description of how to auth for this app driveConfig = &oauth2.Config{