When I check the properties of one of my folders on a FAT32 volume, it says:
Size: 473 MB
Size on Disk: 1.06 GB
Now, I know that the “size on disk” is more because some data files might be smaller than a cluster size. For example, a 1kb file will fully occupy a 4kb cluster and so it takes 4kb “on disk.” This means that if you have a lot of small files that there can be a sizable difference between size and size on disk.
Questions:
-
This folder only has 300 files in it. Why in the world is the “size on disk” taking up over TWICE as much space as the information?
-
That’s horrible. Is there any way to fix this?
Thanks!
IIRC, what you refer to in your post is known as slack. And yes, if you have losts of files smaller than your cluster size they will fill up a sizeable portion of your hard drive.
As to you problem, have you defragged the hard drive lately? If not, chances are you have all sorts of <1kb pointers on your hard drive, each taking up 4kb of space. Defragging your hard drive so as to make contiguous file structures should free up quite a bit of wasted space.
It isn’t just files smaller than a cluster, it’s all files that don’t fit exactly into a multiple of a cluster size.
With 4k clusters, any file that is greater than a multiple of 4k and less than the next multiple of 4k, will have somewhere between 1 byte and 4k bytes of slack. For example, a file that is 20.2k takes 24k on disk with 4k clusters. So does a file that is 23.9 k.
Since files lengths tend to show a kind of random distribution, on average you waste one half of a cluster for each file in the folder.
So on a disk with 4k clusters, a folder with 300 files would be expected to waste about 300 times 2k, or 600k. Add this to your actual files size, and it fits very well with you’re seeing.
Not much you can do and keep the files as separate files. If you zip them into a single large file, your max waste will be less than 4k. I’ve seen processes that save all the files on your disk (or in specific folders) as a single physical file, and extract them as individual file on the fly. It’s been a few years since I tried one, don’t know how well they work these days.
Ok, I slipped a decimal point in that post. 300 x 2k is 600k, not the 600 meg you seem to be missing. So now I’m not sure what’s going on.
Ignore me tonight, I’m brain dead.
Is it possible that the directory includes a lot of hidden files?