What "allocation unit size" should I use for a drive with a single NTFS partition?

70

25

I'm formatting a 1TB external hard drive as a single NTFS partition. This drive is mainly meant for storing media.

Should I choose something other than the default allocation unit size? The options range from 512 bytes to 64K. Are there any guidelines that I should use with partitions storing other data? Should I stop poking around and just leave it at "default"?

Andrew Keeton

Posted 2009-08-28T22:04:40.283

Reputation: 2 341

4Don't exceed 4096 or else you won't be able to use NTFS file compression at all. – None – 2014-12-09T21:17:56.500

1There is an incompatibility for NTbackup,exe+WIN XP writing a bkf backup file to a partition with a cluster size > 2K. Cluster size makes the backup file fail to verify or restore any files (NTbackup was originally from tape I/O era). I came across this when I bought a external 2TB drive that came with default 4K cluster size. Reformat the external drive partition to use 2K cluster fixed it. (2K cluster is not suitable for any larger partition). I did find other networked machines could make valid backup when 4K cluster drive was a net share I guess SMB client does not see any cluster size. – Scott R – 2018-02-02T23:18:33.647

1What if you are formatting a 32GB flash drive for booting multiple iso distributions such as memtest, linux and hiren's boot cd? – bgmCoder – 2018-05-11T15:25:29.893

Defaults are almost always good. – Mike Christiansen – 2012-10-02T06:31:14.450

Answers

39

If you are a "Standard User" by Microsoft's definition, you should keep the default 4096 bytes. Basically, the allocation unit size is the block size on your hard drive when it formats NFTS. If you have lots of small files, then it's a good idea to keep the allocation size small so your hard drive space won't be wasted. If you have lots of large files, keeping it higher will increase the system performance by having less blocks to seek.

But again, nowadays hard drive capacity is getting higher and higher making small differences by choosing the right allocation size. I suggest you just keep the default.

Also keep in mind that the majority of files are relatively small, larger files are large in size but small in units.

Jonathan

Posted 2009-08-28T22:04:40.283

Reputation: 1 857

Your answer was included in an article: https://www.howtogeek.com/136078/what-should-i-set-the-allocation-unit-size-to-when-formatting/

– Shayan – 2019-09-27T08:54:58.003

3+1, also several programs like scandisk or defrag utilities have trouble with non standard cluster sizes. – hyperslug – 2009-08-28T22:23:55.563

I ended up going with the default (thanks for the advice hyperslug). I figure that any small performance gains I might get from tweaking the allocation unit size would be dwarfed by the USB transfer speed. – Andrew Keeton – 2009-08-29T17:11:38.577

32

In terms of space efficiency, smaller allocation unit sizes perform better. The average space wasted per file will be half the chosen AUS. So 4K wastes 2K per file and 64K wastes 32K. However, as Jonathon points out, modern drives are massive and a little wasted space is not worth fussing over and this shouldn't be a determining factor (unless you are on a small SSD).

Compare 4K vs 64K average case waste (32K-2K = 30K), for 10,000 files that only comes out to 300,000KB or around 300MB.

Instead think about how the OS uses space. Let's say you have a 3K file which needs to grow 2K. With a 4K AUS the data needs to be split over two blocks - and they may not be together so you get fragmentation. With a 64K AUS there are a lot fewer blocks to keep track of and less fragmentation. 16x the block size means 1/16th the number of blocks to keep track of.

For a media disk where your photos, music and videos are stored (files typically 1MB+) I use the biggest AUS. For a windows boot partition I use the Windows default (which is 4K for any NTFS drive smaller than 16TB).

To find out what the cluster size is on an existing disk:

fsutil fsinfo ntfsinfo X:

Andrew

Posted 2009-08-28T22:04:40.283

Reputation: 872

1Small allocation units are not without drawbacks, else everyone would simply use 1-byte clusters to reduce waste ("file slack") to zero! Or 1-sector clusters (historically 512 bytes; now 4096 bytes).

Drawback: Halving the cluster size means twice as many clusters. In FAT32 filesystems, doubling the FATs can easily cancel out the waste reduction. NTFS instead has an allocation "bitmap" (only 1 bit per cluster) and a file's directory entry lists its clusters (with consecutive clusters listed compactly as ranges). Larger clusters reduce the possibility and the cost of file fragmentation. – A876 – 2019-02-15T06:58:42.817

12

I am setting up four Seagate ST3000DM001 3TB drives in a RAID 10 configuration. After reading up on how to format it for the Allocation Unit Size, I found this article: General Guidelines for Improving Operating System Performance.

When configuring drive arrays and logical drives within your hardware drive controller, ensure you match the controller stripe size with the allocation unit size that the volumes will be formatted with. This will ensure disk read and write performance is optimal and offer better overall server performance.

I am using the ASUS P8Z77-V DELUXE motherboard's built-in RAID capability from Intel chipset. Since the Default Stripe size for RAID 10 on the motherboard is 64KB, I am formatting my RAID array using the "64 kilobytes" option in Windows.

Anyway, I hope this information I found helps for other people researching for this topic and add more information to it.

stun

Posted 2009-08-28T22:04:40.283

Reputation: 101

4

Just be aware the larger cluster size you use, the better performance you will have. But the efficiency decreases.

If you have a 3TB disk and store thousands of pictures, you would want a smaller cluster size for space efficiency, but if you make it too small you will take a severe performance hit.

For any disk 500gb or bigger, I recommend 8k cluster size or larger.

badcrc

Posted 2009-08-28T22:04:40.283

Reputation: 61

2

It can make a difference.

A file can only be a multiple of whatever you select, so a finer grained format will mean you will waste less space on files - but make your allocation table bigger.

If you're going to have thousands of files under 64k it's worth considering a lower size unit. However, if you're going to fill the drive with huge, hundred megabyte videos, then a higher unit size is more applicable.

If you don't know, just go with the default.

salmonmoose

Posted 2009-08-28T22:04:40.283

Reputation: 1 675

1

You point out disk usage as video and music. Majority data file sizes then should be 2MB+ for music and 100MB+ for video, some playlist (less then 5% of overall file quantity) of few kB. You point out the device is external USB disk.

The best solution for such specification is exfat(vfat on linux) or NTFS with 64kB block/allocation unit size. Some hints on what file system you should chose: - xxfat should be used for faster writes and compatibility (ie. you plan/ already use media streaming device for your home/office usage) - NTFS for security and advanced features. (security is still source of problems for home users - be sure you need it)

Have a fun.

Piter_no1

Posted 2009-08-28T22:04:40.283

Reputation: 11