Start-AzureStorageBlobCopy vs AzCopy: Which Takes Less Time
They will both use the same time as all they do is initiate Async Server-Side Blob Copy
. They simply tell the service to start copying the blob from source to destination. The actual copy operation is performed by Azure Blob Storage. The time it takes to copy a blob will depend on a number of factors, including but not limited to:
- Source and destination location.
- Source block size.
- Upload to storage service.
source to share
Starting AzCopy without specifying the / SyncCopy option and running the Start-AzureStorageBlobCopy PowerShell command should take the same time because they both use an asynchronous server-side copy.
If you want to copy blobs across regions, you'd better consider specifying the / SyncCopy option when doing AzCopy in order to achieve consistent speed, as the asynchronous copying of data will run against a backdrop of servers that say you might see inconsistent copy speed between your "copy" "operations.
If the / SyncCopy option is specified, AzCopy will first load the content into memory and then load the content back into Azure Storage. To get the best performance / SyncCopy, you should run AzCopy in a virtual machine whose scope matches the register of the source store. Also, the size of the virtual machine (which determines the bandwidth and CPU number) is likely to affect copy performance.
For more information, see Getting Started with the AzCopy Command Line Utility
source to share
They don't take the same time.
I tried to copy from one account to another and made a huge difference.
Start-AzureStorageBlobCopy -SrcBlob $_.Name -SrcContainer $Container -Context $ContextSrc -DestContainer $Container -DestBlob $_.Name -DestContext $ContextDst --Verbose
This takes about 2.5 hours.
& .\AzCopy.exe /Source:https://$StorageAccountNameSrc.blob.core.windows.net/$Container /Dest:https://$StorageAccountNameDst.blob.core.windows.net/$Container /SourceKey:$StorageAccountKeySrc /DestKey:$StorageAccountKeyDst /S
It will take a few minutes.
I have about 600 MB and about 7000 files here.
Elapsed time: 00.00:03:41
Finished 44 of total 44 file(s).
[2017/06/22 17:05:35] Transfer summary:
-----------------
Total files transferred: 44
Transfer successfully: 44
Transfer skipped: 0
Transfer failed: 0
Elapsed time: 00.00:00:08
Finished 345 of total 345 file(s).
[2017/06/22 17:06:07] Transfer summary:
-----------------
Total files transferred: 345
Transfer successfully: 345
Transfer skipped: 0
Transfer failed: 0
Elapsed time: 00.00:00:31
Does anyone know why this is so different?
source to share
In most scenarios AzCopy
, it will probably be faster than Start-AzureStorageBlobCopy
initiating a copy, resulting in fewer Azure API calls:
- [
AzCopy
] 1 call for the whole container (regardless of the quantityAzCopy
)
against
- [
Start-AzureStorageBlobCopy
] N number of calls due to the number of blocks in the container.
I originally thought it would be the same as both seem to run the same asynchronous copies on the Azure side, however on the client side this will be seen directly, as @ Evgeniy found in his answer.
In block 1 in a containerized scenario, theoretically, both teams will complete at the same time.
* EDIT (Possible workaround): I was able to cut the time significantly:
- Removing console output AND
- From the
-ConcurrentTaskCount
radio button-ConcurrentTaskCount
in my case, set the value to 100. Cut that down to under 5 minutes now.
source to share