ContentsBackNext ArticleHome
  Missing Disk Space! -- How to Calculate It

I have devised a very rough method to calculate the amount of "waste space" you can expect for a given cluster size. It only works for bigger partitions containing a large number of files. Here's the formula:

waste space = (files) x (cluster size) x 0.5 x (fudge factor)
where waste space is the number of unrecoverable bytes in partially filled clusters,
  files is the number of files in the partition,
  cluster size is the partition's cluster size, in bytes, and
  fudge factor is a constant that adjusts for things like file size distribution (see below).

For smaller cluster sizes, you can make a pretty good guess at the waste space by assuming that the amount of "slack" per file will be, on average, about one-half of a cluster -- that's the "(files) x (cluster size) x 0.5" part of the equation. The "fudge factor" attempts to compensate for two things that are much more important with large clusters: directory overhead and, especially, the proportion of files that are much smaller than the cluster size. Here are the fudge factors:

Partition Size
(megabytes)
  Cluster Size
(bytes)
  Fudge
Factor
>128 to 256MB   4096 (4KB)   1.2
>256 to 512MB   8192 (8KB)   1.6
>512 to 1024MB   16,384 (16KB)   1.8
>1024 to 2048MB   32,768 (32KB)   1.9

For example, I have a 511MB partition containing 7744 files. "Properties" reports 453MB used with 58.3MB free. The above formula says I have an additional 50,751,078 bytes lost to waste space -- about 48.4MB. (In fact, this is very close to the actual value in this case.)
     This partition resides on a 730MB hard drive. Suppose I had simply made the entire drive one large partition. This would increase the cluster size from 8192 bytes to 16,384. The calculated waste space would then be 108.9MB!

w950511


Maintained by William K. Walker
Copyright © 1997 by William K. Walker
Last update: 20 Jan 97