Getting very slow speed while downloading storage blob.

vsi_pranav 156 Reputation points
2020-09-08T19:01:48.357+00:00

Hello,
I am getting very slow speed while downloading the storage blob from Azure storage account. I am using .net core 3.1 web api application to download it and return it with api response. Following is the code.

BlockBlobClient blockBlobClient = blobContainerClient.GetBlockBlobClient(filepath);

if (await blockBlobClient.ExistsAsync() == false)
{
return BadRequest("blob " + blockBlobClient.Name + " is not present");
}

Stream blockBlobStream = await blockBlobClient.OpenReadAsync();

return File(blockBlobStream, blockBlobClient.GetProperties().Value.ContentType, blockBlobClient.Name);

Azure account details
Performance tier: Standard/Hot
location: Central US, East US 2
replication: Geo-redundant storage (GRS)
account kind: BlobStorage

I am not getting whether this is the issue in my code or should I use any other method to download or is it the problem from Azure storage account or bandwidth related issue. Kindly please let me know if anyone knows the solution.

Thanks in advance..

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,933 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sumarigo-MSFT 47,101 Reputation points Microsoft Employee
    2020-09-09T14:50:55.68+00:00

    @vsipranav-0854 May I know what download speed are getting and How much data are you downloading?
    You can use Azure speed test tool to check the speed: https://www.azurespeed.com/Azure/Download

    There is similar discussion threads, You may also refer to the suggestion mention in this Q&A forum and GitHub and let me know the status.
    Can you try downloading same data using azcopy tool and check are you getting the same download speed?

    Additional information: There is no throttling on the Azure side below the published 60 MB/s scalability target for a single blob. If the network and client machine can handle the traffic then we will send it.

    Here's a guide for troubleshooting high E2E latency: https://learn.microsoft.com/en-us/azure/storage/common/storage-monitoring-diagnosing-troubleshooting#metrics-show-high-AverageE2ELatency-and-low-AverageServerLatency

    You can also, refer the below documentation for azure storage performance. If it doesn’t I would recommend you create a technical support ticket to find the root cause of the issue. The ticket enables you to work closely with the support engineers and get a quick resolution for your issue. If you don't have the support plan we will try and help you get a one-time free technical support. In this case, could you send an email to AzCommunity[at]Microsoft[dot]com referencing this thread as well as your subscription ID. Please mention "ATTN subm" in the subject field. Thank you for your cooperation on this matter and look forward to your reply.

    Microsoft Azure Storage Performance and Scalability Checklist

    Additional information:

     var ms = new MemoryStream();  
     await blobClient.DownloadToAsync(ms).ConfigureAwait(false);  
     var blobStream = await blobClient.OpenReadAsync().ConfigureAwait(false);  
     var props = await blobClient.GetPropertiesAsync().ConfigureAwait(false);  
     return File(blobStream, props.Value.ContentType, blobClient.Name);  
    

    Hope this helps! Kindly let us know if the above helps or you need further assistance on this issue.

    ---------------------------------------------------------------------------------------------------------------------------------------------------------

    Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    3 people found this answer helpful.

4 additional answers

Sort by: Most helpful
  1. dorathoto 6 Reputation points
    2020-09-28T18:53:44.07+00:00

    in 2020, the speed is still ridiculous!
    in my region (Brazil) I can download 2mbp/s
    in other regions 120kpbs
    Even having a dedicated 450mbp/s fiber optic internet that I usually download at 40Mb/s
    I did a test and on AWS outside my region I downloaded it at 32mb/s while on Azure 128kbp/s

    I'm an Azure fan, but that makes me understand why AWS is so ahead of Azure.

    1 person found this answer helpful.

  2. Eric Evans 1 Reputation point
    2020-10-26T13:27:56.89+00:00

    We have had speed problems as well. For us it all started a month ago after the outage and since then we've had batch tasks timing out on a regular basis that previously had no issues. MS told us to build new pools, which we did, and it made no difference. I've been monitoring the storage E2E latency and seeing random times up to 18 seconds! We've also had SQL timeout issues since the outage where a job will timeout after 20 minutes with SQL pegged but then when we run it again, it runs completely in just a minute. All of the communication occurs within Azure itself and again, this all started right after the outage a month ago.

    0 comments No comments

  3. Peter Drier 31 Reputation points
    2020-11-16T21:56:59.527+00:00

    I'm seeing something similar. But it's very inconsistent. I'll go to download a blob via the storage explorer (in Chrome) and it'll take 2+ minutes to download 35mb. Then even a minute later I can download the same exact file in 4-6 seconds.

    I did a speedtest while waiting on one of the downloads and got 95mbit down at that exact moment. So chances are it's not on my end.

    I am using "Shared Access Signatures" on these files. Though one would hope that slowed down the first byte and not the whole file.

    -Peter


  4. Alex Hatcher 6 Reputation points
    2021-04-14T17:48:20.95+00:00

    i run a 100 Meg upload using AZcopy 10.9 and SAS to Azure Blob

    will take 15 minutes behind cisco ASA firewall.

    same powershell script on a box bypassing Cisco ASA firewall and it takes seconds.

    same SLOW connection will show 800 mbps on microsoft speedtest on both sides of firewall.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.