Azure Storage Data Movement Library copy is much slower than AzCopy

I have next test setup:

  1. One test Azure blob storage account
  2. Local folder with ~3000 small files (200 bytes each)

When I execute azcopy command:

azcopy copy --recursive "c:\localDir\*" "https://BLOBConnectionString"

it takes ~2 seconds to copy data.

When I do next c# code:

ServicePointManager.Expect100Continue = false;
ServicePointManager.DefaultConnectionLimit = 32;
TransferManager.Configurations.ParallelOperations = 32;
var account = CloudStorageAccount.Parse("https://BLOBConnectionString");

CloudBlobClient client = account.CreateCloudBlobClient();

CloudBlobContainer container = client.GetContainerReference("container");
await container.CreateIfNotExistsAsync();

CloudBlobDirectory destinationBlob = container.GetDirectoryReference("data");
await TransferManager.UploadDirectoryAsync(@"c:\localDir\", destinationBlob);

It takes ~1 minute to copy same amount of data. I expect to have approximately same latency results for c# code base.

1 Like

Umm… OK? OK!

1 Like