Change default parallelism and chunk size#7008
Draft
Jinming-Hu wants to merge 1 commit intoAzure:mainfrom
Draft
Conversation
Member
Author
|
/azp run cpp - storage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Azure Storage C++ transfer defaults to better match modern hardware by basing parallelism on CPU count and increasing default chunk/block sizes, aligning with #7007.
Changes:
- Increase default download chunk size to 16 MiB (Blobs, Files Shares; DataLake via Blob option aliasing).
- Change default transfer parallelism to be CPU-based (upload: CPU count; download: CPU/2 with a minimum of 1).
- Add
_internal::GetHardwareConcurrency()helper in azure-storage-common and wire it into option defaults.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_options.hpp | Update download chunk size default and compute CPU-based concurrency defaults. |
| sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp | Update upload concurrency default to use CPU count via shared helper. |
| sdk/storage/azure-storage-common/src/concurrent_transfer.cpp | Add cached hardware concurrency helper implementation. |
| sdk/storage/azure-storage-common/inc/azure/storage/common/internal/concurrent_transfer.hpp | Declare hardware concurrency helper (used by option defaults). |
| sdk/storage/azure-storage-common/CMakeLists.txt | Add new source file to the common library build. |
| sdk/storage/azure-storage-blobs/src/block_blob_client.cpp | Increase default minimum stage block size to 16 MiB for uploads. |
| sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp | Update download chunk size default and compute CPU-based concurrency defaults. |
Comment on lines
14
to
18
| namespace Azure { namespace Storage { namespace _internal { | ||
|
|
||
| int GetHardwareConcurrency(); | ||
|
|
||
| inline void ConcurrentTransfer( |
Comment on lines
+780
to
+782
| int32_t Concurrency = _internal::GetHardwareConcurrency() / 2 != 0 | ||
| ? _internal::GetHardwareConcurrency() / 2 | ||
| : 1; |
Comment on lines
+1029
to
+1030
| int32_t Concurrency | ||
| = _internal::GetHardwareConcurrency() != 0 ? _internal::GetHardwareConcurrency() : 1; |
Comment on lines
+1334
to
+1336
| int32_t Concurrency = _internal::GetHardwareConcurrency() / 2 != 0 | ||
| ? _internal::GetHardwareConcurrency() / 2 | ||
| : 1; |
Comment on lines
+1405
to
+1406
| int32_t Concurrency | ||
| = _internal::GetHardwareConcurrency() != 0 ? _internal::GetHardwareConcurrency() : 1; |
Comment on lines
+1021
to
+1022
| int32_t Concurrency | ||
| = _internal::GetHardwareConcurrency() != 0 ? _internal::GetHardwareConcurrency() : 1; |
Member
Author
|
still under discussion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #7007
Pull Request Checklist
Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:
See the detailed list in the contributing guide.