Skip to content

Change default parallelism and chunk size#7008

Draft
Jinming-Hu wants to merge 1 commit intoAzure:mainfrom
Jinming-Hu:transfer_default_vals
Draft

Change default parallelism and chunk size#7008
Jinming-Hu wants to merge 1 commit intoAzure:mainfrom
Jinming-Hu:transfer_default_vals

Conversation

@Jinming-Hu
Copy link
Member

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.

  • C++ Guidelines
  • Doxygen docs
  • Unit tests
  • No unwanted commits/changes
  • Descriptive title/description
    • PR is single purpose
    • Related issue listed
  • Comments in source
  • No typos
  • Update changelog
  • Not work-in-progress
  • External references or docs updated
  • Self review of PR done
  • Any breaking changes?

Copilot AI review requested due to automatic review settings March 17, 2026 04:28
@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Mar 17, 2026
@Jinming-Hu
Copy link
Member Author

/azp run cpp - storage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
@Jinming-Hu Jinming-Hu marked this pull request as draft March 20, 2026 05:53
@Jinming-Hu
Copy link
Member Author

still under discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change default parallelism and chunk size

2 participants