locked
VHDX Disk Format, Block Size RRS feed

  • Question

  • Hey Guys, 

    Sorry to ask such a basic question, but can someone please tell me what the difference is between or what is meant by block size in general but also in the context of this article: 

    https://docs.microsoft.com/en-us/windows-server/administration/performance-tuning/role/hyper-v-server/storage-io-performance

    I dont seem to be able to separate out what i actually means, for instancei know that allocation unit or cluster size is the smallest until of space that is used on a Disk drive. If you have a 1K file and 4K cluster size then when you save that 1K file it will actually take up 4K of space. 

    Further i dont get how setting the Block Size on a VHDX file to 32MB (default) or 256MB makes any sense? Would that reserve huge portions of the disk for possibly a small number of files? 

    Thanks, 

    Robert


    Robert

    Thursday, March 29, 2018 5:22 PM

Answers

  • Hi Robert,

    Based on the research, the block size for a VHDX has nothing to do with anything that you know about block sizes for disks in any other context. For VHDX, block size is the increment by which a dynamically-expanding disk will grow when it needs to expand to hold more data.

    It can only be set at creation time, and only when you use PowerShell or native WMI commands to build the VHDX. For a fixed disk, it is always 0.

    The default block size is 32 megabytes. This means that if a VHDX does not have enough space to satisfy the latest write request and has not yet reached the maximum configured size, the VHDX driver will allocate an additional 32 megabytes for the VHDX and will perform the write. If that is insufficient, it will continue allocating space in 32 megabyte blocks until the write is fully successful.

    You could refer to the article below.

    https://www.altaro.com/hyper-v/understanding-working-vhdx-files/

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Best Regards,

    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, March 30, 2018 5:37 AM

All replies

  • Hi Robert,

    Based on the research, the block size for a VHDX has nothing to do with anything that you know about block sizes for disks in any other context. For VHDX, block size is the increment by which a dynamically-expanding disk will grow when it needs to expand to hold more data.

    It can only be set at creation time, and only when you use PowerShell or native WMI commands to build the VHDX. For a fixed disk, it is always 0.

    The default block size is 32 megabytes. This means that if a VHDX does not have enough space to satisfy the latest write request and has not yet reached the maximum configured size, the VHDX driver will allocate an additional 32 megabytes for the VHDX and will perform the write. If that is insufficient, it will continue allocating space in 32 megabyte blocks until the write is fully successful.

    You could refer to the article below.

    https://www.altaro.com/hyper-v/understanding-working-vhdx-files/

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Best Regards,

    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, March 30, 2018 5:37 AM
  • Hi,

    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    Best Regards,

    Mary


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, April 2, 2018 9:06 AM
  • Hi,
    Could the above reply be of help? If yes, you may mark it as answer, if not, feel free to feed back
    Best Regards,
    Mary

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, April 3, 2018 1:42 AM
  • Thanks Mary thats the confirmation i was looking for.

    Robert


    Robert

    Tuesday, April 3, 2018 9:51 PM