Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow parallel upload using blob_client::upload_block_blob_from_buffer #96

Open
BenjaminLanfer opened this issue Sep 3, 2020 · 1 comment
Assignees

Comments

@BenjaminLanfer
Copy link

When trying to upload especially smaller files using blob_client::upload_block_blob_from_buffer I find that upload speed is very slow (~500kbit/s). It appears that only a single parallel request is used although the maximum number of concurrent requests was set to 64.

From a cursory glance at the code, a rather large block size is chosen. That is, the minimum block size is set to azure::storage_lite::constants::default_block_size = 8 * 1024 * 1024, which is 8MB. Also, the grain size is set to around 4MB, where it is only 64kB in blob_client::download_blob_to_buffer.

Would it be feasible to set a smaller block size to allow for more blocks being uploaded in parallel even for smaller files?

Thanks for looking into this.

@katmsft katmsft self-assigned this Sep 3, 2020
@katmsft
Copy link
Member

katmsft commented Sep 3, 2020

The block size was originally chosen to enable LBB feature that can ultimately boost performance at the service side. This is considered a feature request to expose the option to specify the block size to a smaller value and is put to our backlog.

In the meantime, you can check the track 2 Storage SDK which has similar dependencies with CPPLite here and will be more actively maintained: https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/storage

The block size can be customized in the mentioned track 2 SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants