官术网_书友最值得收藏!

Configuring sector sizes

In a computer storage system, the allocation unit or a cluster is a unit of disk space allocated to files. An allocation unit is the smallest unit, or disk space, that an operating system can assign to store the data, that is, a file. Allocation unit sizes vary, depending on the chosen filesystem. This diagram shows the physical structure of a disk system, illustrating the differences between DISK SECTOR, TRACK SECTOR, CLUSTER OR ALLOCATION UNIT, and TRACK:

NTFS supports several allocation unit sizes, while ReFS has fewer choices, as shown here:

For example, if you store a 20-kilobyte file on a disk formatted with 16-kilobyte allocation units, the operating system allocates two allocation units for storing the file, or 32 kilobytes in total. That means the 20-kilobyte file uses 32 kilobytes of disk space. The difference, 12 kilobytes, is called slack space. The default NTFS allocation unit size is 4,096 bytes, although you can choose between 512 and 64 kilobyte sizes.

Depending on the sector size and on the typical file sizes you store on a volume, the slack space varies. For example, if you store mostly large files on a volume formatted with a smaller size sector, the slack space is smaller. On the other hand, if you store mostly small files on a volume formatted with a large sector size, expect to have a much larger slack space. 

If you are running Hyper-V, the sector size choice has a direct impact on the storage I/O performance. From Windows Server 2012, VHD format has been optimized to have a 4,096-byte alignment with the host storage subsystem, resulting in better performance. If you used VHD files created with operating systems prior to Windows Server 2012, these VHDs are not aligned and will not achieve the same performance as VHDs created with the newer Windows operating systems.

To convert a VHD into a new format, use this PowerShell command:

Convert-VHD –Path E:\vms\testvhd\test.vhd –DestinationPath E:\vms\testvhd\test-converted.vhd

To check whether the VHD is aligned, type the following PowerShell command:

Get-VHD –Path E:\vms\testvhd\test.vhd

Non-aligned VHDs will return the Alignment property as 0 (zero), while aligned VHDs will return the Alignment property as 1 (one).

VHD files use 512-byte logical sector sizes, while VHDX files use 4,096-byte logical sector sizes. Thus, choosing a default 4,096-byte disk sector size aligns perfectly with a VHDX logical sector size, avoiding any negative impact on the performance. Other major difference between the VHD and VHDX files is that the VHD maximum size is 2 TB, does not provide data protection, can't be resized live, and supports vendors other than Microsoft. On the other hand, VHDX files have a maximum size of 64 TB, provide data protection, can be resized live, handle snapshots better, and are only supported by Microsoft. 

主站蜘蛛池模板: 天水市| 长沙市| 宣威市| 礼泉县| 博罗县| 五大连池市| 鹤庆县| 宽城| 宿州市| 阜平县| 岳池县| 和静县| 平乡县| 盘锦市| 巴青县| 徐汇区| 义马市| 修武县| 平安县| 天祝| 依兰县| 中江县| 资中县| 昌都县| 钦州市| 潞西市| 陆川县| 农安县| 白山市| 峨眉山市| 科尔| 宁明县| 汨罗市| 白山市| 扶风县| 开江县| 怀远县| 手机| 年辖:市辖区| 宁波市| 台南市|