none
Azure blob maximum number of files

    Question

  • Hi ,

    I was trying to understand maximum number of files that could be upload with in a blob

    so while searching I came across this msdn link

    https://msdn.microsoft.com/en-us/library/azure/ee691964.aspx?f=255&MSPPError=-2147217396

    Which says this

    Block blobs let you upload large blobs efficiently. Block blobs are comprised of blocks, each of which is identified by a block ID. You create or modify a block blob by writing a set of blocks and committing them by their block IDs. Each block can be a different size, up to a maximum of 4 MB, and a block blob can include up to 50,000 blocks. The maximum size of a block blob is therefore slightly more than 195 GB (4 MB X 50,000 blocks). If you are writing a block blob that is no more than 64 MB in size, you can upload it in its entirety with a single write operation;

    So what I tried was writing more than 50,000 files in single folder for a day which I succeeded( I was not expecting this) and I got confused, what do we mean by blocks.

    Is the maximum size of the blob 195 GB? no matter how many files one uploads...if yes then what is 4MB constraint ?

    Can some one help me understanding this? So if my blob url is http://xyz.com in which I have day-wise folders...how all this falls in to this scenario ?

    Wednesday, September 9, 2015 8:37 AM

Answers

All replies

  • Look at my picture.

    The 4 MB limit is for  1 Block, that means that if you have a single file of 8 MB, it will use 2 blocks.

    And an entire Single Block Blob can contain up to 50.000 blocks so 4 MB *50.000 Blocks = 195 GB.

    You storage account can span multiple block blobs, and is up to 500 TB

    https://azure.microsoft.com/pl-pl/documentation/articles/azure-subscription-service-limits/


    Regards, Samir Farhat || Datacenter Consultant || The way to share my knowledge with the community Visit my blog : buildwindows.wordpress.com

    • Marked as answer by Varun Pathak Thursday, September 10, 2015 3:57 AM
    Wednesday, September 9, 2015 11:44 AM
  • It the meanwhile, i think that there is a typo :

    If you are writing a block blob that is no more than 64 MB in size, you can upload it in its entirety with a single write operation;

    should be

    If you are writing a block blob that is no more than 4 MB in size, you can upload it in its entirety with a single write operation;


    Regards, Samir Farhat || Datacenter Consultant || The way to share my knowledge with the community Visit my blog : buildwindows.wordpress.com

    Wednesday, September 9, 2015 11:46 AM
  • No, it's not a typo:

    If the size of a block blob is no more than 64MB, you can call PutBlob API once directly instead of calling PutBlock API for each block; otherwise you'll have to call PutBlock API for each block (4MB at most) and at last call PutBlockList API to commit the blocks into one block blob.

    4MB is the limitation of a block, while 64MB is the limitation of a block blob which is able to be uploaded by PutBlob API, they are different.

    Thursday, September 10, 2015 3:02 PM
  • Thank you for this info. I was just explaining the sentences.


    Regards, Samir Farhat || Datacenter Consultant || The way to share my knowledge with the community Visit my blog : buildwindows.wordpress.com

    Thursday, September 10, 2015 3:19 PM
  • Would another way to phrase the question be:

    How many 1MB files can you upload to a Block Blob?


    Appreneur Application Architect Software Ronin

    Wednesday, April 27, 2016 6:15 AM
  • Samir, that explains what will happen if each of Varun's files are more than 4MB each. How many 1MB files can you upload to a Block Blob?

    Appreneur Application Architect Software Ronin

    Wednesday, April 27, 2016 6:15 AM