What is the allocation unit size when formatting disks?

Reading time of 708 words
4 minutes
Reading time of 708 words ~ 4 minutes

If you find this content useful, consider buying me a coffee
Or help me out by engaging with any advertisers that you find interesting

Within Microsoft Windows, while formatting drives most people leave the operating system to handle the characteristics of their partitions. But there are times where manually adjusting these options could be beneficial. This post will focus on the allocation unit choice available during formatting, its purpose and how it can benefit you.

When instigating a drive format you are given a dialogue with a number of options. Most are self-explanatory although I’ll quickly run through them here.

Windows 10 Format prompt
Windows 10 Format prompt

Volume label: Allows you to give your drive a memorable or cute name for easy identification.

File system: Except on some Enterprise installations the file system in Windows 10 will nearly always be locked to NTFS. Small partitions will also offer legacy options for MS-DOS era FAT and FAT32 file systems.

Perform a quick format: A standard format checks the drive for hardware errors (bad sectors) while the quick format skips these tests.

Enable file and folder compression: Applies file compression to every file stored on the partition. Generally, it is not used due to the performance hit it introduces.

Allocation unit size menu
Allocation unit size menu

The allocation unit size is an interesting property that is generally left on Default but offers cryptic choices of 4096 through to 2048K. These values represent the smallest amount of space a file can occupy on the partition. A partition is divided up into small units. When files are stored on the partition they are split into smaller parts and inserted into these units.

So a partition created with a 4096 allocation unit will split files into smaller pieces (chunks) of 4096 bytes respectively. For example, a 1MB file equals 1024K which on a 4096 (4K) allocation would be split up into 256 pieces (1024 ÷ 4 = 256) *. If we had a 64K allocation that same 1MB file would be split into 16 pieces (1024 ÷ 64 = 16). That’s potentially 16 times less work for an electromechanical hard drive when reading or writing files on a partition.

* for simplicity I use the inaccurate unit symbols used by Windows

My example partition
My example partition using an allocation unit size of 2048K

Newer NTFS partitions allow a 2048K allocation unit that split the file into 2MB pieces. That is larger than the storage capacity of the floppy disks that were common throughout the 1990s.

The benefits of a large allocation unit only affect older hard disk drives (HDD) and not modern solid state drives (SSD). Because the hard disk drive is electromechanical there are physical restraints that apply. The further a file is scattered over a partition the longer it will take the drive to find all the file parts to deliver to the operating system. In theory, bigger file pieces (chunks) means less actual movement for a hard drive head when writing or reading a file to disk.

So why isn’t the 2048K allocation unit selected by default for all hard disk drives? The main issue is wasted space. The allocation unit also represents the minimum space a file will occupy on a drive. So a tiny text file with 2 characters (2 bytes in size) will sit in a 2048K unit with the remaining 2047.9K of space left unused and wasted. In situations where you have a lot of tiny files, such application generated data that creates a significant amount of wasted drive space.

Firefox generated data files
These 47 small Firefox generated data files use 3.85 MB on a standard NTFS partition
Not enough space
The same files require 126 MB of space on my other NTFS partition which uses a 2048K allocation unit

But there are cases where this wasted space can be minimalised. Partitions used exclusively for backups or the storage of large files such as videos, RAW photos, zip archives or disk images. In these sorts of cases, I’d recommend increasing the allocation unit for new partitions where speed is more important than maximising available space.

I personally have a collection of large 8GB hard disk green drives that are cheap, quiet but are ridiculously slow. They are great for secondary backups of large files that are rarely accessed. And when I use a 64K allocation unit instead of 4096 I notice a significant speed improvement while copying new or updated files to these drives.

Written by Ben Garrett

If you find this content useful, consider buying me a coffee
Or help me out by engaging with any advertisers that you find interesting