PC Pro

CLUSTER SIZE AND SLACK SPACE

-

If you right-click on any file or folder in Explorer and open the Properties window, you’ll see two readouts of its size – first, how many bytes of data it contains and then a second number reflecting how much space it’s actually taking up on your hard disk.

The figures are different because Windows allocates space in atomic chunks, typically of 4KB in size. Thus, even if a file only contains 2KB bytes of data, it effectivel­y occupies 4,096 bytes of disk space – and if the file grows to 4,097 bytes long, it spills over into another cluster and takes up 8,192 bytes on disk. The only exception is if a file is smaller than around 500 bytes, in which case NTFS stores it entirely in the file allocation table and Windows reports it as taking up zero bytes on the disk.

At this point you might be wondering how much “slack” space is being wasted in this way on your own hard disk. To find out, we first need to know the size of your clusters. Although most disks use 4KB clusters, devices that use an older FAT file system (or have been converted from one) might use a different measure, and volumes bigger than 16TB default to larger clusters. You can find out the cluster size of your main Windows disk by opening a command prompt as Administra­tor and entering: fsutil fsinfo ntfsinfo c:

Among the technical details that the command returns, the figure we’re looking for is “Bytes per cluster”; if your cluster size is 4KB, it tells us that, statistica­lly, the average amount of slack space wasted by each file will be 2KB. Now we just need to know the total number of files on the disk, which you can discover by entering: dir c:\ /s /a

This command will take a few minutes to enumerate all the files on your disk, including system and hidden files, and at the end you’ll see a count of total files found. In my case, it reported 1,182,157 files, so with 4KB clusters that implies around 2.4GB of slack space.

If you want to reclaim some of that space, you can do so by switching to smaller clusters. Technicall­y speaking, the only real downside to this is that it leads to increased fragmentat­ion, as files get split into hundreds or thousands of parts, and with an SSD that’s of very little consequenc­e.

Practicall­y, however, it’s probably not worth the hassle – because the only officially supported way to change the cluster size of a disk is to reformat it, and specify the desired allocation unit size at the point when the file system is created. There are commercial products that can perform an in-place, non-destructiv­e conversion, but they’re pricey – one such package is Partition Wizard Pro, which costs $59 for a year-long licence from partitionw­izard.com – and we’re not aware of any free tool that can do the job. Email letters@pcpro.co.uk if you know different!

Newspapers in English

Newspapers from United Kingdom