Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to slow perf of PipeBlob uploads #2779

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# AzCopy v10
wendi
adreed-msft marked this conversation as resolved.
Show resolved Hide resolved
wendi
wendi

wonwuakpa-msft marked this conversation as resolved.
Show resolved Hide resolved
AzCopy v10 is a command-line utility that you can use to copy data to and from containers and file shares in Azure Storage accounts.
AzCopy V10 presents easy-to-use commands that are optimized for high performance and throughput.
Expand Down
22 changes: 22 additions & 0 deletions cmd/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"net/url"
"os"
"runtime"
"strconv"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -1319,7 +1320,7 @@
blobClient, err = blockblob.NewClientWithNoCredential(u.String(), options)
}
if err != nil {
return fmt.Errorf("fatal: Could not create client: " + err.Error())

Check failure on line 1323 in cmd/copy.go

View workflow job for this annotation

GitHub Actions / lint (1.22.5, ubuntu-latest)

printf: non-constant format string in call to fmt.Errorf (govet)
}

// step 3: start download
Expand Down Expand Up @@ -1347,6 +1348,27 @@
func (cca *CookedCopyCmdArgs) processRedirectionUpload(blobResource common.ResourceString, blockSize int64) error {
ctx := context.WithValue(context.TODO(), ste.ServiceAPIVersionOverride, ste.DefaultServiceApiVersion)

// get the concurrency environment value
userDefnConcurrencyStr := glcm.GetEnvironmentVariable(common.EEnvironmentVariable.ConcurrencyValue())

pipingUploadParallelism := pipingUploadParallelism
wonwuakpa-msft marked this conversation as resolved.
Show resolved Hide resolved
if userDefnConcurrencyStr != "" {
// handle when the concurrency value is AUTO
if userDefnConcurrencyStr == "AUTO" {
return errors.New("concurrency auto-tuning is not possible when using redirection transfers (AZCOPY_CONCURRENCY_VALUE = AUTO)")
}

// convert the concurrency value to int
concurrencyValue, err := strconv.ParseInt(userDefnConcurrencyStr, 10, 64)

//handle the error if the conversion fails
if err != nil {
return fmt.Errorf("AZCOPY_CONCURRENCY_VALUE is not set to a valid value, an integer is expected (current value: %s): %s", userDefnConcurrencyStr, err.Error())
wonwuakpa-msft marked this conversation as resolved.
Show resolved Hide resolved
}

pipingUploadParallelism = int(concurrencyValue)
Fixed Show fixed Hide fixed
}

// if no block size is set, then use default value
if blockSize == 0 {
blockSize = pipingDefaultBlockSize
Expand Down
Loading