What is the allocation unit size when formatting disks?
4 minutes
Tip using Ko-fi or Buy Me a Coffee
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.
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.
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
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.
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