Skip to content

Commit 204fb63

Browse files
Add links to perf tuning article
1 parent bce93dc commit 204fb63

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

articles/storage/blobs/storage-blob-download-go.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services: storage
66
author: pauljewellmsft
77

88
ms.author: pauljewell
9-
ms.date: 08/05/2024
9+
ms.date: 09/30/2024
1010
ms.service: azure-blob-storage
1111
ms.topic: how-to
1212
ms.devlang: golang
@@ -49,6 +49,28 @@ The following example downloads a blob to a stream, and reads from the stream by
4949

5050
:::code language="go" source="~/blob-devguide-go/cmd/download-blob/download_blob.go" id="snippet_download_blob_stream":::
5151

52+
### Specify data transfer options for download
53+
54+
You can set configuration options when downloading a blob to optimize performance. The following configuration options are available for download operations:
55+
56+
- `BlockSize`: The size of each block when downloading a block blob. The default value is 4 MB.
57+
- `Concurrency`: The maximum number of parallel connections to use during download. The default value is 5.
58+
59+
These options are available when downloading using the following methods:
60+
61+
- [DownloadBuffer](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#Client.DownloadBuffer)
62+
- [DownloadFile](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#Client.DownloadFile)
63+
64+
The [DownloadStream](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#Client.DownloadStream) method doesn't support these options, and downloads data in a single request.
65+
66+
For more information on transfer size limits for Blob Storage, see [Scale targets for Blob storage](scalability-targets.md#scale-targets-for-blob-storage).
67+
68+
The following code example shows how to specify data transfer options using the [DownloadFileOptions](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/blob#DownloadFileOptions). The values provided in this sample aren't intended to be a recommendation. To properly tune these values, you need to consider the specific needs of your app.
69+
70+
:::code language="go" source="~/blob-devguide-go/cmd/download-blob/download_blob.go" id="snippet_download_blob_transfer_options":::
71+
72+
To learn more about tuning data transfer options, see [Performance tuning for uploads and downloads with Go](storage-blobs-tune-upload-download-go.md).
73+
5274
[!INCLUDE [storage-dev-guide-code-samples-note-go](../../../includes/storage-dev-guides/storage-dev-guide-code-samples-note-go.md)]
5375

5476
## Resources

articles/storage/blobs/storage-blob-upload-go.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ The authorization mechanism must have the necessary permissions to upload a blob
3333

3434
To upload a blob, call any of the following methods from the client object:
3535

36+
- [Upload](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/blockblob#Client.Upload)
3637
- [UploadBuffer](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#Client.UploadBuffer)
3738
- [UploadFile](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#Client.UploadFile)
3839
- [UploadStream](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#Client.UploadStream)
@@ -71,8 +72,16 @@ You can define client library configuration options when uploading a blob. These
7172

7273
You can set configuration options when uploading a blob to optimize performance. The following configuration options are available for upload operations:
7374

74-
- `BlockSize`: The size of each block when uploading a block blob. The default value is 1 MiB.
75-
- `Concurrency`: The maximum number of parallel connections to use during upload. The default value is 1.
75+
- `BlockSize`: The size of each block when uploading a block blob. The default value is 4 MB.
76+
- `Concurrency`: The maximum number of parallel connections to use during upload. The default value is 5.
77+
78+
These configuration options are available when uploading using the following methods:
79+
80+
- [UploadBuffer](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#Client.UploadBuffer)
81+
- [UploadStream](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#Client.UploadStream)
82+
- [UploadFile](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#Client.UploadFile)
83+
84+
The [Upload](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/blockblob#Client.Upload) method doesn't support these options, and uploads data in a single request.
7685

7786
For more information on transfer size limits for Blob Storage, see [Scale targets for Blob storage](scalability-targets.md#scale-targets-for-blob-storage).
7887

0 commit comments

Comments
 (0)