Wizcode was founded in 2001. We now have more than 100,000 customers worldwide.
Slack analysis

Slack analysis

View the slack - wasted space due to use of clusters for storing files on a FAT file system on your Windows Mobile storage card and find optimal cluster size to minimize slack on your Pocket PC


Pocket Mechanic Professional - Storage card slackOne issue related to the FAT file system that has gained a lot more attention over the years is the concept of slack, which is the colloquial term used to refer to wasted space due to use of clusters for storing files. Because virtually all Pocket PCs use the FAT file system for storing data on storage card they are also affected by this specific problem.

A cluster is the minimum amount of space that can be assigned to any file. No file can use part of a cluster under the FAT file system. This means, essentially, that the amount of space a file uses on the disk is "rounded up" to an integer multiple of the cluster size. If you create a file containing exactly one byte, it will still use an entire cluster's worth of space. Then, you can expand that file in size until it reaches the maximum size of a cluster, and it will take up no additional space during that expansion. As soon as you make the file larger than what a single cluster can hold, a second cluster will be allocated and the file's disk usage will double, even though the file only increased in size by one byte.

Changing the cluster size means formatting the storage card using a different cluster size. Picking the correct cluster size may depend on many factors like the number of files on the storage card or the dispersion of their sizes, etc.

The Slack analysis module of Pocket Mechanic Professional will scan the selected file partition on your Windows Mobile device and will display a detailed report on the slack status for the current cluster size and also for all possible cluster sizes. It should be fairly easy to decide which cluster size should be used for the card in order to keep the best balance between wasted slack space and file system performance. Slack space below 5 % to 10% is considered to be low so pick the nearest cluster size. Do not forget to backup your file system if you are going to change the cluster size by reformatting the storage card.