Actual vs. Allocated Disk Space

Some software tools, including ourĀ FolderSizes disk space analyzer, are capable of reporting two size metrics for each file system object it encounters – “size” and “allocated size” (the latter is sometimes also called “size on disk”). In this blog entry, I will discuss what these metrics represent and how they differ.

First, you’ll need to know that disk space is allocated to files in units called clusters. The size of a cluster can vary depending upon several factors, including what file system is used (NTFSFAT32, etc.) and partition size. Most people today running the Microsoft Windows operating system are using NTFS, which has a default cluster size of 4K (4096 bytes).

Since all files are stored within one or more clusters, their “size on disk” (allocated size) is always a multiple of the file system’s cluster size. For example, if you are using NTFS with a 4K cluster size, any file containing between 1 and 4096 bytes of data will consume a single cluster. Any file containing between 4097 and 8192 bytes will use two clusters. And so on.

As a result, any file that has a size which is not an exact multiple of the file system’s cluster size (and the vast majority aren’t) will “waste” a portion of its last cluster. Therefore, a file’s “allocated” size will usually be larger than its actual size. This wasted space is generally referred to as “cluster overhang” or “disk slack.” Some tools (including FolderSizes) can also report upon cluster overhang for folders (directories).

A rough estimate of wasted space for a volume can be calculated by multiplying the number of files it contains by half the cluster size. So, for example, if an NTFS file system with 4K clusters contains 50,000 files, the estimated wasted space would be about 97MB of disk space.

Other factors, such as file system compression can also affect the computation of allocated space.

posted by Key Metric Software at 2:03 am